Minimum Viable Language

3 points by hackaflocka ↗ HN
Every language should come with a "minimum" instruction set. A curated subset of commands and syntax that makes the most common 80% of tasks possible.

My guess is that the MVL for Javascript + jQuery would be about 10% the size of the L.

It would have saved me years of learning and practice time if Javascript + jQuery had an MVL, and I had access to it.

7 comments

[ 3.1 ms ] story [ 21.9 ms ] thread
What you're looking for is Scheme, or perhaps Javascript as it existed in 1995.

The problem with the MVL approach is that ultimately people pay us to solve their problems, and don't care how complicated it makes our lives. That complexity has to go somewhere, and usually the best place for it is in the code, else you're just doing your customer's problem manually. Eventually people realize that they're writing the same code over and over again, and that they could save a lot of time as programmers if those features were just built into the language.

I'd really encourage you to study Scheme and write a few programs in it. It's famous for being the language where you can implement all the other language features in it. So for example, it's pretty common to implement your own object system in it; your programs won't be compatible with libraries that use any other object systems (which is a major reason why it's not used industrially), but you can play around with classical inheritance, prototypes, access control, multimethods, virtual dispatch, and so on all within the language. Similarly, promises, async, green threads, collections, list comprehensions, type systems, and many other language features can all be done as libraries, using the basic features of closures, continuations, macros, cons cells, and arrays. Even things like if-statements, exceptions, and loops don't need special language features, although they're standardized across implementations.

[Every language should come with a "minimum" instruction set. A curated subset]

OP is referring to 'get started' documentation, not to the language itself being minimal-size.

What I consider MVL for JS is ES3. ES3 JavaScript was "good enough" JS to the point that anything else you need came in the form of libraries, polyfills or transpiled (to some extent) back to it.
Read on Shen & Kl.
They seem interesting. Question: how does one write code using these (or any other language really) so that it can run in a user's browser?
I had similar problem, but then I started to look at it from the other way around, and now I am just carrying around a few concepts in my head that I really like, and every time I need to learn new language, I am first looking at how these concepts map:

* data definitions for lists and key/value pairs, and how to nest them, change them, access them

* function and anonymous function definitions

* map, filter, reduce/fold over lists and key/value pairs

* api to communicate with world that uses tasks/promises

This way, my code looks familiar and similar regardless if I write it in C#, Javascript, Java, or Clojure.

Main drawback is, that this limits my comfort zone to languages that have at least lambdas and closures.