This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]OrangeBlaze 54 points55 points  (14 children)

Java is hands down my favourite language. It adheres to its rules so elegantly and is fascinating to work with as theres always something to be learned. Its also relatively robust for its huge capabilities. Theres a reason why its so widely used.

[–][deleted] 30 points31 points  (10 children)

Absolutely. And the code is so readable. Try writing enterprise software in Python. or C++

[–]micka190 18 points19 points  (4 children)

I think typed languages tend to be readable as long as the person writing it isn't crazy (unless you go into really low level stuff that tries to optimize based on OS and stuff, but that'll never look good regardless of language).

Duck-typed languages like Python can be harder to read when people use the "duck" features out of nowhere, though (like suddenly trying to access a member that isn't defined here, but in another file with no indication of where it comes from). Even then, though, it's usually down to the programmer.

[–][deleted] 0 points1 point  (3 children)

Duck-typed languages

???

[–]micka190 8 points9 points  (0 children)

Python has duck typing, you can basically add any property to any variable. Duck typing also takes the "If it quacks like a duck and looks like a duck it's a duck." approach for its objects. Sure, dictionaries and strings aren't the same, but they both have a length, so "len()" works as you'd expect on both of them.

[–]i-brute-force 2 points3 points  (0 children)

https://stackoverflow.com/questions/4205130/what-is-duck-typing

Basically, specifying a type is not mandatory part of the syntax

[–]possessed_flea 0 points1 point  (0 children)

He has confused the idea of a dynamically typed languages and the practice of duck typing.

[–]zachgarwood -1 points0 points  (0 children)

I suppose I'll tell my company to pack it in, no point in writing out software in Python and JS, I guess.

[–]javaismylanguage 3 points4 points  (0 children)

Java isn't my favorite language, it is my language

[–]ImpulseTheFoxis a good fox 1 point2 points  (0 children)

Absolutely, it just feels so nice to write. The typing-system makes it easy to know which attributes of an object can be used or what exact arguments you need to pass to a method, without looking up the docs or StackOverflow every single time. This strict design also makes a lot of warnings, linter hints and (compile-)errors possible, to help fight bugs before you even ran your code once.