Splintering into Dialects on Purpose

As I mentioned last time, Newton will follow Python except when there is a strong reason not to. This contradicts something I wrote earlier, that generators will be immutable. But now I’m beginning to think I want both behaviors. I don’t mean making mutation optional, I mean two separate languages, one with mutation and one wholly without.

Many languages have dialects, for instance Scala has a dialect for the web called Scala.js. But the dialects are usually an afterthought and not designed together. It’s easy to understand why, since it’s more work and splits the community. So why would anyone do it?

In my case, it’s because I want a smaller language than full Python and with functional semantics. I want certain things to be impossible to express so that I can guarantee they will never happen. Being smaller, the reduced dialect can also be finished faster, and I really want to get something out the door as soon as possible.

But at the same time, I still need a general-purpose language with mutation for the compiler itself at the very least, and as a statically typed alternative to Python in general. This dialect will have to include most things in Python, such as classes and exceptions.

Maybe the different use cases will compell me to grow them in different directions over time, but I will try to make the semantics of the smaller language a subset of the larger. This does not only make it easier for users to jump between them, it also minimizes the additional compiler work required.

Stefan