Tuesday, May 24, 2011

I Hate C++ Part 857: But I Already Had Coffee!

Sigh...
(ioMesh.is_edge(pts[pts.size()-2],pts[pts.size()-1]),h,vnum)
Clearly it's time to switch to espresso.

3 comments:

  1. I suppose what you object to here is more the naming standard used than the expression itself? Definitely agree that Java has better recommended naming standards and I would use such names if I were to use C++ today.

    ReplyDelete
  2. No - the objection is to C's "," operator. In this case, instead of getting the 4-argument is_edge, I get the 2-argument is_edge, and then the return value of is_edge is replaced by the random values of the uninitialized h, vnum.

    It's a case of too many forms of syntactic sugar. The result is that nearly anything compiles, no matter how silly.

    ReplyDelete
  3. Ok I see it now :) Wow, hope the compiler issues some kind of warning here at least on pedantic levels.

    ReplyDelete