I want to treat this as an opportunity to talk about how I analyze proposals in preparation for and during core discussions . I’ll start by saying that I think that this is a good idea in the abstract and I totally accept the legitimacy of the justifications offered. I want to draw a major distinction between this idea and, like, a package that wraps jQuery or something. This is thoughtful and not, to me, in conflict with Elm’s philosophy.
Now, I can’t predict the future and Evan ultimately makes these calls, but I don’t think this is going to be implemented and here’s why:
There are many factors that go into considering an idea, but a decent way to do a quasi-objective evaluation of a new feature idea is to consider:
To what greater degree does the feature enable an Elm user to achieve the goals Elm proposes to help with beyond what is already possible?
This is budgeted against:
- the long term pedagogical cost of introducing a new thing Elm can do that people will learn and teach and think about and discuss
- the potential to impact other future changes that are currently under consideration
- the cost of implementation and maintenance
For this feature, we’ve already established it’s possible and reasonable (and pretty nice, IMO) to do type-driven development with Debug.crash. In a language without this possibility this might be a huge win, but we already have it so there’s no gain. Then let’s consider the aesthetic improvements. Is minimizing clutter for a specific style of development worth the default costs of a feature as listed above, and then is it worthy of prioritization among existing work? I don’t think so. The implementation wouldn’t be a big deal, but maintenance is more unpredictable. I don’t think there’s a huge risk of impeding future progress beyond the unforeseeable. There could definitely be a pedagogical cost, as error messages would have to be reconsidered and teaching materials that deal in type signatures would need to reflect the new behavior. It seems like a purely optional feature but I don’t think that’s really true in practice. New Elm users are bound to encounter it quickly and wonder what it means to be able to write a type signature with no definition.
All of the same goes for making nice slides.
Anyway, this isn’t like an official policy or anything. It’s just my approach to evaluating stuff and I’ve found it useful in synthesizing my opinions during core discussions.
Just to finish up on maybe more of an upbeat note,
I mentioned before that I don’t think this as a language feature is really an optional advanced feature in practice. But! If it were implemented as an editor feature then it would be truly opt-in and also have none of the other costs I talked about. Maybe a plugin could insert the Debug.crash calls in secret or insert them and automatically code-fold them so that the compiler is still happy with the contents of the file. It’s worth exploring! Like I said, I think this is a nice idea in general.