Short version: With some compiler flags, the “high learning curve” objection to scala could be easily (I hope) overcome and it could be seen instead as: easy to start, grow in place when ready, never unduly limited.
Specificaly, it is hard to persuade people to use Scala because of the perceived learning curve. Scala can be seen as 1) a better java, and 2) as a way to use rich language features on the JVM. When choosing a language for someone’s next project, those two are in conflict. On one existing project, scala code seemed to me fairly hard to read, even with experience, and some developers thought “not for me”.
I want to suggest that such a concern can be removed, to the benefit of smiling programmers, by defining levels of language complexity, enforced by the compiler, to make using scala in a project always potentially at least as easy as java, kotlin, etc, with just ~1 hour of scala training, and that a project could then specify when to allow other language features when the project developers are ready and want that. That could completely change the perception of the learning curve and how it can be managed by projects or organizations.
Would this be best brought up in the “contributors” forum, something for dotty, or elsewhere? It seems easy to implement right now without waiting for dotty, but maybe it just seems that way due to my ignorance.
Longer version / more thoughts:
I’ve been using scala at a non-expert level for some years, thinking of it as a “better java today, with headroom for the future”, and would like to encourage others to use it. But in the attempts I found either someone was put off by the learning curve on the one hand, or they wanted to use functional or advanced idioms and features that discourage other new developers from joining the project. I wish I could more easily explain that in about 1 hour of scala study or training, scala can be successfully used at a basic level that is better than java, and which allows one build on that knowledge to grow greatly as a programmer in the future.
Or, can you recommend a language like that? I realize that scheme/lisp, C, or many languages can be so adapted, just like C can be used for some OOP with structs, but not as easily as if the compiler could help enforce clarity and simplicity and let projects choose their level of preferred complexity.
I think it would help that effort if there were a strictly-defined “introductory scala” level, enforced at a compiler level, and then 1-2 or more other levels that can be chosen by a project when they are ready to use more language features. This could be done with compiler flags and/or some very simple project-level configuration, even specifying language features to allow at a granular level if someone wanted to be very incremental or specific.
Thus scala becomes a viable option in practice for any level of developer or any project that wants to preserve maintainability by a particular level of developer, and make conscious per-project choices of when to change that level.
Examples: some people like java, kotlin, golang, python, etc for the reason that more developers can understand them. But it is possible to reach a point where one regrets not having the features that those languages lack. Similarly, I sometimes like to use the jedit text editor because it is ~“easy like notepad, powerful like emacs”.
I often think in terms of maturity models (details buried in my web site at http://onemodel.org ) where one who wants to work and grow concurrently, can do so in a planned way without throwing away the knowledge of the initial learning steps. Scala could become like that: a better java, with room to grow (all the headroom you will probably ever need).
I don’t know, but maybe this could even affect compiler speed further for many projects.
The “simpler” scala could be the default, and specified to contain all the “better java” features (maybe something like java + immutability, Option type, better for loops, and traits), ideally a level that is “guessable” or fully usable by a java5 programmer with 1-2 hours max of scala learning, a fully usable language as strong as java is today (possibly excepting features few use, if necessary to achieve that defined simplicity): a full-fledged programming language. Other levels then add scala features that would be used as one learns more about types, functional programming, etc, all the way up to unlimited/open.
The “simpler” scala could probably be ~“marketed” as “new/improved” (catch some buzz) if it had a new name: maybe dotty is that, or maybe “filbert” or whatever, pitched as a kotlin, easy to learn, with terrific headroom.
Would this question be better on the “contributors” forum, or in some dotty-related forum?