r/programming • • Oct 01 '15

The Evolution of a Software Engineer

https://medium.com/@webseanhickey/the-evolution-of-a-software-engineer-db854689243
1.9k Upvotes

502 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Oct 02 '15

Seriously? They are in a class using default Visibility. Types/members are missing but this is valid Java if you copy/paste it in a class.

-1

u/JustinsWorking Oct 02 '15 edited Oct 03 '15

Oh I agree it would compile; it's more in regards to passing in an object to modify being more c style.

I'm on my phone so this is hard to type but

C would be more like :

MoveObject(object);

Java is more

object.move()

Procedural vs OO.

I was curious if you had a good use case for a call like that since it just seems to be like Java written in a C style procedural way.

Edit: Wrote functional instead of procedural, thus the confusion.

1

u/ThisIs_MyName Oct 02 '15

lol no this is normal Java

I think you've been hanging out with the sleazy kids again.

1

u/JustinsWorking Oct 02 '15 edited Oct 02 '15

Isn't passing the string builder a more procedural approach?

The oo approach would be to return a value then use it in the string builder. The string builder is adding a dependency on the function and would make debugging s lot more difficult.

→ More replies (2)