PHP is Russian. Used to be huge, caused lots of problems, now slowly dwindling away. Its supporters keep saying how it’s still better than the competition.
basic is like toki pona then i guess, like python but even easeier
no wait, that ones gray snail (minimalist vocabulary: it has only 4 commands)
Argh, politics in IT.
Python malfeliĉas min.
Mi pensas ke, vi volis tajpi, “Python (aŭ Pitono) malfeliĉigas min.”
- Mal : Opposite
- Feliĉ- : Happy
- Ig : Makes (Transitive verb)
- As : Present tense.
“Mi malfeliĉas.” : I’m sad.
“Pitono malfeliĉigas ĉiujn.” (Python makes everyone sad.)
Can anyone actually tell what exactly complicated in Java? Verbose, maybe it was at some point but I find it very straightforward and easy.
Java itself is kind of blissful in how restricted and straightforward it is.
Java programs, however, tend to be very large and sprawling code-bases built on even bigger mountains of shared libraries. This is a product of the language’s simplicity, the design decisions present in the standard library, and how the Java community chooses to solve problems as a group (e.g. “dependency injection”). This presents a big learning challenge to people encountering Java projects on the job: there’s a huge amount of stuff to take in. Were Java a spoken language it would be as if everyone talked in a highly formal and elaborate prose all the time.
People tend to conflate these two learning tasks (language vs practice), lumping it all together as “Java is complicated.”
$0.02: Java is the only technology stack where I have encountered a logging plugin designed to filter out common libraries in stack traces. The call depth on J2EE architecture is so incredibly deep at times, this is almost essential to make sense of errors in any reasonable amount of time. JavaScript, Python, PHP, Go, Rust, ASP, C++, C#, every other language and framework I have used professionally has had a much shallower call stack by comparison. IMO, this is a direct consequence of the sheer volume of code present in professional Java solutions, and the complexity that Java engineers must learn to handle.
Some articles showing the knock-on effects of this phenomenon:
- https://stackoverflow.com/questions/11865307/how-to-expand-size-of-java-stack-trace-to-see-bottom-of-stack-triggering-a-sta
- https://www.reddit.com/r/java/comments/16g30jx/can_java_errors_stack_traces_be_longer/
- https://www.quora.com/Why-does-the-Java-Spring-Framework-produce-gigantic-unreadable-stack-traces
- https://community.splunk.com/t5/Splunk-Dev/What-are-the-best-extraction-methods-for-Java-Stacktrace-Errors/m-p/380397
- https://stackoverflow.com/questions/65436457/springboot-stack-trace-logging-filter-only-from-my-packages
Char count for same functionality is still at least double in java vs python. It just feels like a chore to me. jetbrains helped, but still python is just so light
Char count is poor complexity metric. Perl is better than Python with your logic as it is more condensed.
Its standard library reads like someone’s Object Oriented Programming 101 final project, and they probably got a B- for it. Everything works and follows OO principles, but they didn’t stop to think about how it’s actually going to be used.
Let’s try to read a file line-by-line:
BufferedReader reader = new BufferedReader(new FileReader("sample.txt")); String line = reader.readLine();
We’re having to instantiate two objects (
FileReader
and thenBufferedReader
) just to get an object that has areadLine()
method. Why? Can’tBufferedReader
take a file name on its own and work it out? OrFileReader
just providesreadLine()
itself?Not only that, but being parsimonious with what we import would result in:
import java.io.BufferedReader; import java.io.FileReader;
But we’re much more likely to be lazy and import everything with
import java.io.*;
. Which is sloppy, but I understand.I can see what they were thinking when separating these concerns, but it resulted in more complexity than necessary.
There’s a concept of “Huffman Coding” in language design. The term itself comes from data compression, but it can be generalized to mean that things you do often in a programming language should be short and easy. The above is not good Huffman Coding.
Library built this way because it supposed to be flexible and provide ground for complex usecases. It can only be flexible if your API works with simple abstractions which you can then compose. It’s not driven by “I need this specific utility for this specific scenario”. That would be zoo you have in JS where you have 10 ways to iterate over array and 9 of them wrong for your scenario.
Java’s OO is great because they design library with SRP in mind making sure there is few but good ways to do things.
BufferedReader cannot accept file name because it makes arbitrary reader… well buffered. It’s not BufferedFileReader, even that would accept something like Path or File, not string, because File can be remote file, should Reader now know all possible local and remote protocols and path formats? What else it must do?
Having it designed the way it is, allows Java to have utilities for various scenarios. Your scenario covered by standard lib too. See Files.readAllLines which, surprise-surprise, built on top of BufferedReader.
Library built this way because it supposed to be flexible and provide ground for complex usecases.
It’s definitely that, and not the fact that it was written in the first half of the nineties when everyone and their mother was all in on OOP/OOD to the detriment of usability.
BufferedReader cannot accept file name because it makes arbitrary reader… well buffered. It’s not BufferedFileReader, even that would accept something like Path or File, not string, because File can be remote file, should Reader now know all possible local and remote protocols and path formats? What else it must do?
You’re just describing the problem. Yes, I see where they’re going with this. It’s still a usability nightmare. I can’t think of another language that makes you jump through hoops like this on IO, and they get along fine without it.
I think a lot of it is “ceremony”, so it’s pretty common in java to:
- create a get method for every object variable
- create a set method for every object variable
Then add on top that you have the increased code of type annotations PLUS the increased code of having to check if a value is null all the time because all types are nullable.
None of that is hugely complicated compared to sone of the concepts in say Rust, but it does lead to a codebase with a lot more lines of code than you’d see in other similar languages.
Before someone says it, I know a lot of this stuff doesn’t need to be done. I’m just giving it as examples for why Java has the rep it does.
i still don’t understand. is it easier in python or JS to make getters and setters? with python my experience has been the opposite, with the decorator based solution in mind.
or if the problem is that they exist, as an option to be used, why is that a problem? they can be implemented in any other language, and it can be useful.then yeah, you should check for nulls. just like for None’s in python, or if you have the correct type at all, because if it’s entirely different but ends up having a function or variable with the same name then who knows what happens.
then in javascript besides null, you also have undefined and NaN!It’s not easier to do getters or setters but especially in python there’s a big culture of just not having getters or setters and accessing object variables directly. Which makes code bases smaller.
Same with the types (although most languages for instance doesn’t consider None a valid value for an int type) Javascript has sooo many dynamic options, but I don’t see people checking much.
I think it boils down to, java has a lot of ceremony, which is designed to improve stability. I think this makes code bases more complex, and gives it the reputation it has.
I think it boils down to, java has a lot of ceremony, which is designed to improve stability. I think this makes code bases more complex, and gives it the reputation it has.
I’m not a java programmer, but I like it more because python and js projects are often very messy
i still don’t understand. is it easier in python or JS to make getters and setters? with python my experience has been the opposite, with the decorator based solution in mind.
or if the problem is that they exist, as an option to be used, why is that a problem? they can be implemented in any other language, and it can be useful.then yeah, you should check for nulls. just like for None’s in python, or if you have the correct type at all, because if it’s entirely different but ends up having a function or variable with the same name then who knows what happens.
then in javascript besides null, you also have undefined and NaN!
according to larry wall perl is the looney tunes theme song
Rust is esperanto because its only actually used by a small group of nerds,
python is russian because everything made in it is unreliable.
Haskell is Esperanto. The difference being that Rust is actually catching on.
Python is Spanish; a ton of people learned a bit in school and never picked it back up again. Places that speak it natively all have their own conventions because, even though the native languages were replaced by colonizers, a lot of the native languages patterns remained in place. Most places that speak it are super welcoming and stoked that you’re trying to learn.
In Soviet Russia memory manages you!
Ackshully, Clojure is Esperanto, and I will not be taking questions at this time.
I miss writing in clojure. I never have a reason to write in a functional language at work
I want to disagree on German. It isn’t verbose. We’ve got several words where there isn’t an equivalent in pretty much any other languages. Including Schadenfreude und Torschlusspanik (the feeling that you are getting older l, can’t find a partner and will die alone).
The same EU legal text has in German 22.118 words Vs English 24.698.
The making me cry part, that’s fair. Overcomplicated, could be worse.
The same EU legal text has in German 22.118 words Vs English 24.698.
That needs a character count really. Words isn’t a particularly relevant measure when the language uses compound words
My favorite German words are verschlimmbessern and Backpfeifengesicht.
Here is a list with explanation and more examples:
https://callinggermanyhome.com/cool-german-words/Java class names look like German compound nouns though
That’s bullshit, we don’t do camel case!
I think word count is not the best metric precisely because of what you mention. “Krankenversicherungskarte” is one word vs the three word “health insurance card”, but they convey the same information in roughly the same amount of characters.
Overall I don’t find German particularly verbose, only sometimes a small phrase is condensed into a single word.
Hm?
I don’t know german but it seems to be more logical to have one word for “health insurance card” since it describes one class of objects. Better than spelling 3 nouns where one partially describes what object is and other nouns act like clarification
APL is Ithkuil.
But people like and appreciate German.
Yeah, I enjoyed learning German… Java on the other hand…
It fits, English and JavaScript are both three languages in a trench coat.
It’s a cool meme but I have many many disagreements.
I can confidently tell you that no one who actually knows Latin would ever say French is “Latin with fancy rules.”
…which ironically makes for a perfect parallel with “C/C++”
C++ is pig latin
I just have some high school Latin from long ago, but if you parse “fancy” as “ornamental at the expense of utility”, then I think it’s a fair description.