-
-
Notifications
You must be signed in to change notification settings - Fork 315
Description
Last update: 2023-03-08
Here are my thoughts on what Elvish 1.0 means and when to release it.
Background
Elvish has, up until then, been designed and implemented predominantly by one person, namely me. I certainly don't mean to belittle the contributions from and discussions with the community, nor do I reject a future where Elvish becomes more like a community project. Nonetheless, I am the only person who can push directly to the repo, and I have never merged any code that I don't personally like.
Having a small team of designer for a language is a better idea than it might sound (and 1 is the smallest you can get). For instance, C was designed by Dennis Ritchie; Go by Robert Griesemer, Rob Pike and Ken Thompson; Clojure by Rich Hickey. None of those languages are perfect, but they are more coherent and tend to be smaller than languages designed by committees. (Examples abound; Scheme is a notable, perhaps only, counter-example).
To conclude, before the Elvish community evolves significantly, Elvish will remain designed (and "controlled", if you will) predominantly by me. This is both a constraint of reality and a good thing. As a result, this design note and potentially many others to come, will be colored by my honest personal opinions.
With that out of the way let's get to the actual topic...
What Elvish 1.0 means
I treat the significance of 1.0 as pretty much the same way as Go treated its 1.0, namely there is a compatibility promise. What this means is the following:
-
There will be a more or less rigorous language specification (this is Go's);
-
Any code written against that language specification will continue to work in future releases of Elvish 1.x.
In other words, once a language feature is in Elvish 1.0, it will be in all of Elvish 1.x releases. One can workaround that by explicitly marking some features as unstable and not documenting them in the language specification, but I want to avoid that wherever possible.
I would also think that Elvish 1 should have a lifespan of at least 10 years from the 1.0 release. Combined with the compatibility release, this means that Elvish 1.0 language needs to get things as "right" as possible, because once it is released, I will stick to such features for 10 years (this is not a promise, but rather a goal).
Also note that the UI experience is not put under the compatibility promise. My hope is that by Elvish 1.0, the UI will have become modular enough that it can have its own versioning, and breaking changes in the UI is more acceptable than the language.
What are still not right
So the reason we haven't had an Elvish 1.0 release yet is, of course, some parts of the language are still not "right". This is a strictly subjective matter, and this is where my personal taste kicks in.
Here is a preliminary list of things I don't find "right" yet. As anyone familiar with programming languages will notice, all of those problems are already understood within the PL theory community, and many have multiple solutions. However, the real problem here is a design one: which solutions to pick and mix to make Elvish feel simple and coherent.
-
A story for writing safe, concurrent code. The pipeline is a great mechanism of concurrent programming, but it doesn't cover everything. Elvish should provide a rich system of memory-safe concurrency primitives.
- Have clear rules around when variable access is guarded by mutexes.
- Have first-class value channels (today channels are parts of pipes, but the pipe made by
file:pipedoesn't have channels) - Maybe STM. (Clojure has STM, but Rich Hickey said that it's rarely used in practice as people just bundle related states together and make them atomic.)
- Maybe some sort of reactive programming system. This feels sorely needed when designing the editor API, but I'm not yet sure about use cases beyond that.
-
Some sort of type system. Some elements I like from more recent languages:
- TypeScript's type system, especially the structural parts.
- Clojure's spec. It's not a type system, but has some promising ideas
- Shallow and optional typed Racket has some recent research on the tradeoffs of soundness and performance.
-
Make it easy to distribute software written in Elvish. The current
epmpackage was implemented with the use case of a traditional "personal plugin manager" in mind, and doesn't really help with distributing standalone scripts. Some elements I like from recently designed systems:- Clojure's deps is a small but comprehensive package management system.
- Deno's remote import makes module dependencies part of the source file.
-
Make it easier to write portable shell scripts.
- A more comprehensive stdlib for interacting with the OS without using external commands
- Good support for detecting OS differences and external command versions. (Maybe this doesn't have to be builtin, but rather something implemented in Elvish code.)
-
Builtin testing support.
-
A better story for handling exceptions.
-
Good support for REPL-aided dev flow, a la Lisp (if you don't know what this means, this page in Clojure's website may be useful). This isn't purely a tooling matter: language design choices need to be compatible with REPL tooling.
That's it for now; the list will likely grow and shrink over time as I update this post to reflect the status.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status