New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When to release Elvish 1.0 #815
Comments
Addendum to what's still not right:
|
Another more interesting question that I haven't "got right" is the ability of defining new types from Elvish code. (There currently isn't any.)
Another way to summarize this is that there are three different requirements that pull the design in different directions:
|
|
I think this would be great. Although the concept of a 'pipeline' is the first one greeting us on the elvish home page, most elvish commands are not pipeline aware (why there is a rather cryptic |
I was surprised and disappointed when I learned that |
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.
State sharing between concurrent threads. Shells are inherently concurrent languages due to the existence of pipelines. However, it is not clear how to share state between threads in a safe way: Elvish today is actually an concurrency-unsafe (or concurrency-dangerous if you will :) language, and you can actually crash Elvish by concurrently accessing variables from different goroutines.
Should all variables be guarded by mutexes (in other words, make all variables atoms)?
As far as I know no language does this, but Elvish can probably do it if we are willing to permanently give up performance in favor of safety and ease of use.
If we do this, it makes atomic access to single variables easier, but might end up making atomic access to multiple variables harder too.
Should concurrent access of variables simply be disallowed, and CSP-style concurrency enforced?
Should we keep the core language concurrency-dangerous, and require explicit use of concurrency primitives? Most languages actually do this, but it requires programmers to be careful.
Static type system. A language without any kind of static type system is not likely to be future-proof. I have this vague idea that Elvish should have an optional structural type system much in the style of TypeScript, but there are many details to be figured out.
Should numbers be strings? This might sound like a trivial question, but it's hard to answer.Answer: they both are and aren't! Design is #816.
If numbers are strings (which is the current case), it means that you cannot convert JSON (or any other serialization format, really) to Elvish value and back and get the same value, because JSON numbers are converted to strings.If numbers are not strings, should a literal like42
be a number or a string? This is also hard to answer, because invim 42
, the42
is definitely a filename and thus a string, but in+ 42 2
, the42
is definitely a number.Maybe we should adopt some kind of sloppiness in this subject, treating numbers like strings (and vice versa) sometimes, but not always. But sloppiness is very hard to get right.That's it for now; the list will likely grow and shrink over time as I update this post to reflect the status.
The text was updated successfully, but these errors were encountered: