Re:Lessons Learned from Two Years as a Data Scientist
by Zababa on Saturday September 04, 2021 @04:17PM
(#28418703)
About Java vs Python, modern Java would be:
Python would be:
The big difference seems to be that ArrayList is not a "default" data structure in Java, but it is in Python. While I like the Python example better, I'm not offended by the modern Java.
[ Parent
| on HN ]
Re:Lessons Learned from Two Years as a Data Scientist
by techzerd on Saturday September 04, 2021 @05:29PM
(#28419416)
The author goes full circle by introducing types in python.
Almost every java developer uses an IDE with autocomplete so they would most likely not use a var (where they wouldn't) ..type the interface they want to use, add the assignment operator and then just let the IDE suggest the implementation, add the import and even format the line/file.
Such trivialities don't help when attempting to distinguishing the flexibility python bring for arbitrary/quick code
Re:Lessons Learned from Two Years as a Data Scientist
by qsort on Saturday September 04, 2021 @05:16PM
(#28419303)
Actually, as a Java dev, I quite like modern Java for data work. Streams + static typing make aggregating data a breeze.
I assume for more advanced work like the one OP mentions you'd still want to stick to Python because of the superior ecosystem, but I was pleasantly surprised by Java.
Can't believe I'm writing this, but I actually like modern Java.
Re:Lessons Learned from Two Years as a Data Scientist
by Zababa on Saturday September 04, 2021 @05:30PM
(#28419432)
I've only followed Java from far away (last time I used it was Java 7 in college) but modern Java seem like a very nice language. There are also Graal, alternative ecosystems to Spring, good things like that.
Re:Lessons Learned from Two Years as a Data Scientist
by lokimedes on Saturday September 04, 2021 @04:27PM
(#28418790)
That modern Python example scream regression to me.
Why not simply cars = []?
This obsession with killing perfectly good languages with strongly typed hints is completely undermining the point.
Re:Lessons Learned from Two Years as a Data Scientist
by Zababa on Saturday September 04, 2021 @04:52PM
(#28419071)
I think you're in the minority thinking that Python is "killed" by adding static (not strong, Python is already strongly typed) type hints. They are also optional, so you're free to not use them.
To go back to the code example, if you want to express the same thing in Python as in Java, you have to add a type hint to be able to statically check the code. A good thing about Python is that you can choose when and if you want to use a static type hint, while in Java you're forced to use them.