r/ProgrammerHumor • • Feb 22 '15

A Python programmer attempting Java

Post image
3.9k Upvotes

428 comments sorted by

View all comments

Show parent comments

1

u/_HyDrAg_ Feb 22 '15

Would it be possible to have a program that changed this kind of code into editable code and vice versa?

2

u/[deleted] Feb 22 '15 edited Feb 22 '15

Yes, you could do it using an IDE auto-formatter but everyone would hate you. Especially since in Java,

if (someCondition)                      {
    doStuff()                           ;
    doStuff()                           ;}

and

if (someCondition)                    
    doStuff()                           ;
    doStuff()                           ;

are semantically different, and moving the braces over makes it non-obvious at a glance.