4 ms·
Your mileage may vary, but I went from liking simple languages like Java, to very expressive, complex ones (Scala, Haskell, Rust) back to Java. I mean, I like
by kaba0 4y ago
Your mileage may vary, but I went from liking simple languages like Java, to very expressive, complex ones (Scala, Haskell, Rust) back to Java.
I mean, I like all those languages (and many more), but the thing is, most programs really don’t need all that many language features — an okayish type system, OOP for encapsulating private vs public state, and preferring immutable public APIs have served me well in almost every problem thrown at me.
I would much rather take a “boring” language with an absolutely huge ecosystem and just get my work done. Especially that after going high-level/managed, there is no feature that would give any significant productivity boost (as per Brooks).
- sirsinsalot 4y agoIt isn't often I see Java described as simple.
- kaba0 4y agoIt has quite a few keywords, you have primitives and objects and you call methods on those. Compare it to C#, Swift or C++, and it is insanely tiny compared to those.
- zelphirkalt 4y agohttps://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html https://docs.oracle.com/javase/tutorial/java/nutsandbolts/_k... lists 50 keywords for Java. https://en.cppreference.com/w/cpp/keyword https://en.cppreference.com/w/cpp/keyword lists 97 keywords for C++. https://realpython.com/python-keywords/ https://realpython.com/python-keywords/ lists 35 keywords for Python 3.8. https://en.wikipedia.org/wiki/Smalltalk#Syntax https://en.wikipedia.org/wiki/Smalltalk#Syntax lists 6 keywords for Smalltalk. Neither one of them I would consider small or simple, but you are correct, that Java has much fewer than C++ and I would definitely agree, that it is the simpler language.
- sirsinsalot 4y agoSimpler syntax != simpler semantics. Also syntactic sugar can simplify language comprehension but adds tokens. Keywords is a poor metric for complexity in any sense other than choice of keywords. That IMHO doesn't make a language complex in any meaningful way engineering wise.
- xmcqdpt2 4y agoJava is a simple language even if people build gigantic piles of abstractions in it. It doesn't have multiple inheritance, it only has like eight base types, only a few well-worn ways to control flow (while, do while, for, if, switch, throw, return). It doesn't have operator overloading, or array access overloading. Attributes and methods are instantly discernible by the presence or lack of parentheses. It doesn't have templates or macros. I don't know many languages that are as simple as Java. If anything Java being so simple syntactically is a major reason why it's so wordy.
- zelphirkalt 4y agoSmalltalk should be a no-brainer then. Arguably one of the simplest languages with merely 6 keywords and immense power. The ecosystem is of course a question. I think I can understand the journey from Java -> other -> Java, because as you learn more about programming, you become more capable of solving problems properly in a simpler language. But there might be a point, when you get fed up again with writing the same old stuff over and over again, and journey on into languages, which allow you to abstract from syntax, making programming more pleasant. And then maybe back again, for type safety or another reason. It is very understandable to move between those preferences over time, or even have an inner conflict about what one wants to use for ones next project.
- peterashford 4y agoI've tried to get into Smalltalk many times but I find I always get turned off by the required, clunky, development environments
- igouy 4y agoThe code browsers? https://cuis-smalltalk.github.io/TheCuisBook/ch10-ImageSetUp.png https://cuis-smalltalk.github.io/TheCuisBook/ch10-ImageSetUp...
- peterashford 4y agoYes
- peterashford 4y agoI really like Java. Also Go, C, LISP. I find most of the languages I like are very pragmatic. I'm much more interested in getting stuff done than being clever. I used to quite like C++ but it seems like a minefield of features and gotchas these days. I'm very much a fan of the principle of least astonishment. I feel like Java manages that well and not being a kitchen sink language aids in that.