Live data from Hacker News

Why Java? Tales from a Python Convert

sookocheff.com

11–20 of 102 posts

Re: Why Java? Tales from a Python Convert

#11
post #5
post #2

These examples look like C# 2.5 with a little bit of LINQ.

IMHO, C#'s tooling and is definitely ahead. Java is starting to get there, and I can see why the JVM is still popular. But given the actions of Oracle and MS as of late, I think I'd take MS. VS starter projects are easy to setup and run... Every Java application I've worked on has been an exercise in frustration just getting the environment setup.

Could you elaborate? Java has maven archetypes that allow that, create a base project with no effort and the right dependencies in place. From there on compiling is just a command away, and running it usually too.

Re: Why Java? Tales from a Python Convert

#13
post #4

The one thing keeping me away from Java still is the awful experience around modeling data. Compared to something like a case class in Scala or even autoproperties in C#, writing classes with a bunch of getter and setter methods just to keep state is really tedious.

lombok

Re: Why Java? Tales from a Python Convert

#14
post #4

The one thing keeping me away from Java still is the awful experience around modeling data. Compared to something like a case class in Scala or even autoproperties in C#, writing classes with a bunch of getter and setter methods just to keep state is really tedious.

[deleted]

Re: Why Java? Tales from a Python Convert

#15
i don't care what lipstick you put on that pig: when something as simple as writing to stdout requires that i first create a new class, i'm not interested.

Edit: i do consider this a legitimate issue with how Java 'does' OO. i'd be curious to understand downvoters' thoughts.

One more edit: wow, tough crowd. for those not familiar, i'd suggest reading Steve Yegge's essay "Execution in the Kingdom of Nouns"

Re: Why Java? Tales from a Python Convert

#16
post #4

The one thing keeping me away from Java still is the awful experience around modeling data. Compared to something like a case class in Scala or even autoproperties in C#, writing classes with a bunch of getter and setter methods just to keep state is really tedious.

Or just use public instance variables, really. Unless you plan on explicitly specifying how your internal variables are going to be used and accessed, you don't get a free-lunch.

Re: Why Java? Tales from a Python Convert

#18
post #7
post #4

The one thing keeping me away from Java still is the awful experience around modeling data. Compared to something like a case class in Scala or even autoproperties in C#, writing classes with a bunch of getter and setter methods just to keep state is really tedious.

I'm seriously tired of this argument against getters and setters, just generate them with the IDE some also support collapsible regions with a start and end comment, and forget about them. So considering you can just generate and forget why is it tedious?

If it can be generated, why doesn't the compiler do it for you? This shouldn't be done at the IDE level.

Re: Why Java? Tales from a Python Convert

#20
post #13
post #4

The one thing keeping me away from Java still is the awful experience around modeling data. Compared to something like a case class in Scala or even autoproperties in C#, writing classes with a bunch of getter and setter methods just to keep state is really tedious.

lombok

https://projectlombok.org/

Integrates with the IDE to automatically provide getter/setters and additional features.

Post reply on HN