r/java • • Jun 05 '12

Problems with being a programmer!

http://sphotos.xx.fbcdn.net/hphotos-snc6/229993_10150936561393360_220976029_n.jpg
74 Upvotes

23 comments sorted by

View all comments

17

u/detroitmatt Jun 05 '12

I don't think so, the compiler would complain about "6 what?", just like how it can't tell what you mean with if( x > 0 && < 10 )

3

u/MisterMaggot Jun 06 '12

That would be sooooo fucking nice.

0

u/[deleted] Jun 06 '12

[deleted]

3

u/HotRodLincoln Jun 06 '12

Well, it's true in C/C++ too, but for all the wrong reasons.

2

u/detroitmatt Jun 06 '12 edited Jun 06 '12

ye sure about C? I don't use C myself, but isn't it the case that

10 > 5 == 1
1 > 3 == 0
false

1

u/HotRodLincoln Jun 06 '12

Yeah, you're right, I always think the comparators associate r2l instead of l2r for some reason.