209 points · by lelf · 12y ago · 114 comments
Paul may have been hurting perception of Scala community by his rants a bit lately. But the fork is a greatly welcomed! All the things Paul said make sense. The fork can prove the value of those ideas.
Simpler compiler => more compiler developers => more productive => better compiler => better for the whole community!
As for Typesafe. There are doing great job. Just two releases ago Scala was not compatible even between minor releases. Stability, documentation, training, driving the community, good roadmap for 2.12, etc. Great job! Plus they are build a great framework around akka and play which is gaining traction.
Policy is actually not really a fork. Forks are, imho, projects which diverge code base one day and there's really no sharing between them anymore. Paul is merging from scalac all the time. It really is just vastly simplified scalac with some wise decisions like modularizing some aspects (like parallel collections).
BTW: Anybody worried about a friction while trying to push a bold change in a team of more than one person? Have you ever worked in a team of more than one? :-) Just do it. Prove it. Dismiss the FUD.
Fist questions on my mind: 1) Future? Is this repo intended to pull from scalac or diverge more? 2) Dropping reflection? Does it means removal of macros as well? For the time being or for good? 3) How about leaf node invariance in collections (and other collection stuff you talked about)?
I didn't say I'm dropping reflection, I said I'm dropping the scala-reflect layer. It's a gigantic and useless abstraction penalty. I'll fold the pseudo-compiler into the compiler.
We'll see about collections. Here's where it stands: https://github.com/paulp/psp-std
Some samples (some are quotes, some are paraphrased):
* "The compiler [should be] designed around inputs which are Diff[T]s against an in-memory understanding of the last successful compilation.... As a result, both Repl and Debugger are superfluous as separate tools." (emphasis mine)
* "I want to programmatically generate ASTs and feed them in"
* The AST (the tree) is fundamental, not the language. For example, if you have an AST you're working with, and you hate curly braces, theoretically you could see the same tree "rendered" as text without those curly braces.
* "True power is in restriction" & "unnecessary expressiveness is the enemy" -- whatever your language lets you "say", the "other side" (the compiler or interpreter) has to be able to understand. So unlimited language means horribly over-complicated compiler that cannot do nearly as much optimization as you'd like.
* The more free your code is of "over-precision", the more powerful that code is, because the compiler can do more with it. Example: the well known example of an imperative for-loop versus the functional "map".
* "If you want fast, start with comprehensible."
We did something like this before with scalac back in 2007. But they eventually decided to use lazy rather than incremental evaluation after I left the project (I admit the tech was too crazy and under developed for the time).
But the approach wound up working very well, check out:
http://research.microsoft.com/en-us/people/smcdirm/managedti...
I'd imagine it would work well for Scala today (it took about 6 months to retrofit scalac in 2007, and most of this was just polishing positions for memoization + getting rid of object identities). However, TypeSafe's current approach to reactive programming seems to revolve around Rx and actors, which isn't very useful in a compiler or live interpreter.
> The AST (the tree) is fundamental, not the language. For example, if you have an AST you're working with, and you hate curly braces, theoretically you could see the same tree "rendered" as text without those curly braces.
Ya, but all of this can be done in the IDE. Also, projectional editing isn't quite their yet; I prefer hacks like "Little Braces" for Visual Studio that simply shrink brace-only lines to very small font sizes :) Of course, I think syntax is "language", and having multiple languages flying around isn't great for community building.
Going by the experience with preprocessors in Ocaml, not the best idea IMO.
Excellent talk.
It sounds very much like what he is describing.
The short version is that he lost trust in the Typesafe team and he thinks they are not competent to carry Scala moving forward. Like he says, he tried to change things from the inside, he couldn't, so now he's trying from the outside.
The problem is on the other side of the Atlantic. Scala is unfixable now no matter the abilities of the people working on it because of the bad decisions which have been made to this point and the unwillingness to revisit them even when the failings were grossly apparent.
Organizations modeled on dictatorships can work fine but they're painfully vulnerable to the dictator's blind spots. As the years go by, the dictator becomes accustomed to being able to settle any question by fiat. He becomes less and less concerned with evaluating the true worth of his own ideas. As long as his power is unquestioned and there is a steady supply of people to do the work, why should he? He's the Decider. He decides.
As I told him at some point "That well does run dry eventually" and indeed it did, for me at least.
I'll be keeping a close eye on what you decide to do next, I have no doubt it will be extremely interesting.
https://news.ycombinator.com/item?id=8258255
https://news.ycombinator.com/item?id=8261896
_____________________________
Many (most?) of the debates regarding the scalac roadmap (and attendant tooling) happened in public on the internals mailing list. The simplest explanation is that nobody agreed on allocation of resources, which were mostly a few Typesafe employees and some (largely unknown but very talented) EPFL grad students. A sample thread https://groups.google.com/forum/#!msg/scala-internals/9Ts3GL...
Don't get me wrong. I know that it isn't necessarily the case that "basic" represents "affects plenty of people." But, especially when it was used in a "hits more people than a vocal group that is complaining about a plugin that needs attention," one does get a sense that you will be hit by these things sooner than later.
This is exactly the message that Paul Phillips has been spreading these past months.
Personally, I hope he decides to just create his own language, I would be extremely interested to follow this.
This is somewhat like asking why Richard Dawkins just assumes the Theory of Evolution without justification in his tweets.
Googling Paul Phillips Scala brings up plenty of relevant discussion.
All the talk about scala makes me wonder what the language would have looked like if Java compatibility was never a goal. I'm no language designer and I'm probably wrong but some things that come to mind are 1) no nulls, 2) no distinction between classes and their companion objects, 3) no distinction between traits and abstract classes.
To your second paragraph -- I believe that #2 might have found its way into a Scala-from-scratch, but the others certainly wouldn't. I think the big difference would be in the type system, which could be much simpler if it didn't have to interop with Java's weird generics.
[0] http://www.slideshare.net/extempore/a-scala-corrections-libr...
I don't. You have inserted coercions.
I'm aware of how many bits things have. It's hard to make it through five years on a compiler without gaining some awareness of such details. I consider the introduction of lossy type conversions into the global scope to be a kind of insanity. People should be recoiling from such practices, not looking for ways to justify them.
I don't know much about Scala but I believe that most of its facilities are in the libraries rather than the language itself.
Since he seems to know more about compiling Scala than everyone else I guess it must be a good thing. Lets hope others get to fill the inevitable gaps.
They are the same thing. There is no spec for Scala (no recent one anyway) so the specification is the Scala compiler. And based on everything that Paul has been saying these past months, the compiler is very close to being unmaintainable.
If you're always hearing about how amazingly small scala's specification is, now you know why.
That's going to be a nightmare to Google
Almost as bad as 'play' (which has largely fallen back to 'playframework')
Go is a terrible, terrible name.
Also, I wonder what the two Scala forkers are thinking about Dotty (the next-gen Typesafe scala compiler) and how they imagine merging their ideas in.
trait ParIterableViewLike[+T,
+Coll <: Parallel,
+CollSeq,
+This <: ParIterableView[T, Coll, CollSeq] with ParIterableViewLike[T, Coll, CollSeq, This, ThisSeq],
+ThisSeq <: IterableView[T, CollSeq] with IterableViewLike[T, CollSeq, ThisSeq]]
extends GenIterableView[T, Coll]
with GenIterableViewLike[T, Coll, This]
with ParIterable[T]
with ParIterableLike[T, This, ThisSeq]I've ranted on the mailing list before, but it's overuse of inheritance rather than a type class based approach kills reasoning and modularity. Subtype polymorphic collections libraries are unquestionably a failed experiment.
Apart from that, I think collections can be improved considerably even while keeping dynamic dispatch.
The problem is that the std. lib collections tries to unify mutable/immutable and lazy/eager/finite/infinte datastructures into one class hierarchy. So you have methods like "size" or "add" on generic interfaces that mean different things depending on the implementation. So the entire abstraction ends up being leaky.
Scalaz has a few common implementations of immutable, eager data structures and ends up using a type class approach to modularity and code reuse that ends up not being leaky, it's a joy to use.
I don't think there's anything wrong with using the collections, just be aware that if you run into some edge cases, it's not the language, it's design choices made by the library writer and there may be better implementations.
Paul, if you read this: why don't you do something completely different? Leave Scala and your personal rage behind.
val color = List(
"Red",
"Yellow",
"Green",
)
If I want to add a 4th element I just ctrl+alt+down, I don't have to go back up and add the comma at the end of the last line, I spend too much time juggling commas in lists for my liking.Some programmers work around it like this (which breaks head-inserting, but that's typically a lot less common) :
List("Yellow"
,"Red"
,"Green"
)
Which is pretty ugly (to me). It's one of those minor QOL improvements where I don't see what the downside is.Frankly I wish every language had this feature.
That's a nice example why 99.9% of developers out there should never design a language.
Paul's fork is him exploring some ideas and not intended for widespread use. To quote the README:
"It's still in development, in every imaginable sense. I would prefer not to publish code in this condition ... However since typelevel has also forked the scala compiler, publishing now and giving them an opportunity to exploit my work seems the lesser evil."
Let's come here again in 6 months and see where we stand.