Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It 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.


https://docs.oracle.com/javase/tutorial/java/nutsandbolts/_k... lists 50 keywords for Java.

https://en.cppreference.com/w/cpp/keyword lists 97 keywords for C++.

https://realpython.com/python-keywords/ lists 35 keywords for Python 3.8.

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.


Simpler 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: