←back to thread

122 points todsacerdoti | 1 comments | | HN request time: 0s | source
Show context
knighthack ◴[] No.42193203[source]
What does 'small' really mean?

I would think of a language like Go as small (say, in comparison to Rust or Swift) - the language itself at least, if you discount the standard library.

I find the use of the word 'small' quite confusing.

replies(2): >>42194009 #>>42194011 #
1. emmanueloga_ ◴[] No.42194011[source]
The problem is that there's no universal definition of "small" when it comes to languages.

An article on the Brown PLT blog [1] suggests analyzing languages by defining a core language and a desugaring function. A small core simplifies reasoning and analysis but can lead to verbose desugaring if features expand into many constructs. The boundary between the core and sugared language is flexible, chosen by designers, and reflects a balance between expressiveness and surface simplicity.

Feature complexity can be evaluated by desugaring: concise mappings to the core suggest simplicity, while verbose or intricate desugarings indicate complexity.

So, a possible definition of a "small" language could be one with both a small core and a minimal desugaring function.

--

1: https://blog.brownplt.org/2016/01/08/slimming-languages.html