Ask HN: Programming language size – does it matter?

https://news.ycombinator.com/item?id=27996779
by open-source-ux • 5 years ago
3 3 5 years ago

Does the size of a programming language matter? By size I refer to the features and keywords that make up the language. It excludes supporting libraries.

Examples of languages of different size (subjective):

- Small languges: Lua, Go, Oberon, V

- Medium-sized languages: Crystal, Julia, Nim, Rust

- Large (or large-ish) languages: Ada, C#, Java, JavaScript, PHP, Python, Ruby

JavaScript, PHP, Python and Ruby were probably once small(ish) in language size but have grown in features over the years and no longer count as small, although you might disagree and consider them medium-sized rather than large.

Pros and cons of small vs larger

- Small languages: you can actually learn or master the whole language. Arguably, you lose the convenience of features found in larger languages. Does that mean more code to achieve the same feature found in a larger language? Also, small doesn't always mean simple. There has been much discussion by developers over Go's supposed simplicity.

- Larger languages: more features arguably make things it easier to tackle problems. However, understanding the full scope or reach of the language can be difficult (but not necessarily required). Does that expansive language scope make it harder to understand large codebases? Or does it make the language more expressive?

What do I think? Overall, I favour smaller languages over larger ones and that 'small' is a better language goal over something larger.

Niklaus Wirth, the creator or Pascal, Modula-2 and Oberon is very much in the small language camp. When he created the Oberon programming language, he purposefully wanted a new language smaller than his previous creation Modula-2. (Modula-2 had a language specification of 45 pages. In contrast, the first version of Oberon had a definition report of just 16 pages).

Wirth's thoughts on the matter:

"...it is hard to design a powerful and reliable system, but even much harder to make it so simple and clear that it can be studied and fully understood. Above everything else, it requires a stern concentration on what is essential, and the will to leave out the rest, all the popular "bells and whistles".

What are your thoughts?

Related Stories

Loading related stories...

Source preview

news.ycombinator.com