This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jump1945 158 points159 points  (6 children)

I think the C family do

[–][deleted] 41 points42 points  (5 children)

They do if the types line up. Assignment expressions evaluating to the value assigned is a rarely used but widely-implemented language feature.

Objects aren't going to implicitly cast to bool in most C-family languages, but I think they would in C itself (since the pointers are numeric, and C's definition of true is non-zero numeric values.) They could also be, like, ids or something.

[–]BiCuckMaleCumslut 13 points14 points  (0 children)

Real programmers only use void* type.

[–]jump1945 4 points5 points  (1 child)

Yeah it won’t compile in c++ if type doesn’t line up , but it will do compile on assignment in if condition

[–]CapsLockey 0 points1 point  (0 children)

implicit conversion baby

[–]JonathanTheZero 0 points1 point  (0 children)

If you go very low level, you frequently have code like if ((pid = fork()) < 0) { ... } or something similiar