Hacker News new | past | comments | ask | show | jobs | submit login
Policy – A fork of the Scala compiler (github.com/paulp)
209 points by lelf on Sept 5, 2014 | hide | past | favorite | 114 comments

I'm so happy to see this! Thank you Paul!

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 will continue to merge from scalac for as long as I can, because with no meaningful specification it is the only way to retain compatibility.

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

I just watched the talk, and it is full of insight. Highly recommended even if you've never used Scala (as I have not).

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."

> "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)

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:


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.

"I want to programmatically generate ASTs and feed them in"

Going by the experience with preprocessors in Ocaml, not the best idea IMO.

Doesn't Ocamlpp4 or whatever its called generate OCaml source code and pass that to the compiler, not OCaml AST? The new ppx extension in 4.02 allows direct manipulation of OCaml AST, but that hasn't been used enough yet to determine its effectiveness.

In fact, towards the end of the talk, I was thinking "Wow, he sounds almost as ambitious as Bret Victor." Then, the next slide was a picture and some quotes from Bret Victor. :)

Can someone with some familiarity with Scala community explain why someone who seems to be the largest contributor to Scala felt the need to create a fork? It seems completely justified due to his credentials, but he doesn't give any specific reasons why he created this fork.

Paul Phillips' 2013 rant/talk: https://www.youtube.com/watch?v=TS1lpKBMkgg

After watching this talk I don't care what he comes up with in the future, I want to use it.

Excellent talk.

Are you familiar with JetBrains MPS?


It sounds very much like what he is describing.

Yes, MPS and "language workbenches" in general are chasing something similar. Ideas like these are entirely in the details though, and so far I haven't found anything which does it for me. I could easily be missing it, in part because systems like MPS have a high up-front investment, and I have regretted such investments more often than not.

I don't think an IDE is the answer to the problem.

I think making Scala more correct and more modular is the answer. Hygienic macros and syntactic extensions are more what I had in mind. Rust seems to be a solid contender here but it's much more of a systems language.

The slide "What I'm after" may be found around the 38 minute mark.

That guy is a maniac. Much of the stuff that he was ranting off about are textbook examples of why functional programming and imperative programming ought to be separated from each other


It turns into a rant about how he'd wish the compiler and the editor and the source control should be all talking with one another.

It's funny, because there's actually a language just like that: Smalltalk. The development environment is the same as the runtime environment, it has its own source control (Monticello), its own editor and a very regular language.

I can assure you of two things:

1) Paul is not ignorant of the existence of Smalltalk

2) Smalltalk is not a replacement for the fruits of modern language research. In fact, the academic work around Smalltalk is nothing more than unsupported opinion, and it's not even remotely useful as a source of research.

Parent was out of line but there is still plenty of modern academic research occurring around Smalltalk. Not to mention Gilad's Newspeak (which may or may not be academic, you'd have to ask him).

Can you think of a single example that:

1) Posits new conjectures 2) Proves those conjectures 3) Those conjectures can be used to formulate new conjectures that conform to items 1-3?

I've read a great deal of smalltalk literature, and I can't recall any papers that would qualify. There's plenty of empirical exploration of ambiguous hypothesis, but nothing that actually provides anyone in the field anything on which they could actually build.

Smalltalk lost the spot in the industry thanks to Java, sadly I doubt it will hardly get a second chance.

Back in the mid-90's, before Java was released to the world, I was using VisualWorks for an university project.

IBM was a big enterprise player with Visual Age for Smalltalk.

A small startup (Animorphic) was making Smalltalk faster (StrongTalk).

There were, of course, other companies searching their piece of the pie.

When Sun started pushing Java to the world, many in the Smalltalk world shifted direction.

Visual Age for Smalltalk architecture became the foundation of Eclipse.

Sun eventually bought Animorphic and Hotspot was born out of StrongTalk VM ashes.

Slowly, other Smalltalk players joined the party.

Smalltalk is dynamically typed so it's a non starter for most of the Scala and Haskell folks. Same for Lisp.

Well, there was StrongTalk as well.

"It's funny, because there's actually a language just like that: Smalltalk."

I don't see how that's "funny" or relevant, as there are many other things about Scala that Smalltalk isn't just like.

It's hard to decide if his deep emotional investment is inspiring or frightening.

Why can't it be both??

I also vote for both.

If in doubt, order everything on the menu.

He gives a few hints on the github page and in the many presentations he's been giving these past months since he left Typesafe.

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.

Typesafe hasn't lost my confidence. Typesafe has been responsible for important progress which is already being taken for granted. People either have forgotten how low assurance was in the 2.8 days, or they weren't using scala yet.

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.

Thank you for all your contributions, Paul, you have been instrumental in helping me improve my understanding of various programming language and functional concepts.

I'll be keeping a close eye on what you decide to do next, I have no doubt it will be extremely interesting.

Want to express my thanks for all you have done for the Scala and JVM communities so far. Looking forward to seeing what's next.

Has martin publicly responded to this anywhere?

Martin has been determinedly ignoring me for so long (at least two years, probably more) I've pretty well forgotten it was ever otherwise. He is undoubtedly correct that ignoring me achieves better damage control than any active response could.

> "The leadership of scala has shown itself unfit stewards of the core technologies and the total price paid by scala programmers (actual and potential) is too high. I failed for half a decade to change that from the inside. Now I'll try from the outside."

That's a strongly worded statement for a front page, but I wish I knew something more about the situation. What progress is being held back? I've not written a line of Scala myself.

Internals, mostly, I think. Correctness. According to Phillips, the internals of scalac are a complete mess, and the runtime generated code is also non-ideal. Basically, all sorts of software best practices are being broken to achieve performance and ensure Scala is a superset of Java.

there is in fact more forking happening:




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...

That thread doesn't exactly inspire confidence in choosing Scala as a platform, to be honest. With quotes such as "There's still plenty of very basic stuff in the compiler which doesn't work," I'm honestly not sure how anyone could look forward to a dive.

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.

> That thread doesn't exactly inspire confidence in choosing Scala as a platform, to be honest.

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.

I would actually say that he is making it worse, in some respects. Many, actually. I get that he is very capable. I don't think he is necessarily doing the platform any favors with this attitude or fork.

That is, how is this helping? If he gets a better compiler out, great. Are the odds high that will happen?

Especially with the history that the community has had with a few high profile individuals either constantly making waves and/or basically turning away from the community after some time... To say that the community seems toxic is an understatement.

Granted... this may convince folks that the truely toxic elements have jumped to other pastures. In some ways, this would be better for the typesafe landscape. That seems a stretch, though.

> I would actually say that he is making it worse, in some respects. Many, actually.

Oh, for sure. The key though is that the value of "it" which I am making worse is not a value of "it" which I have any interest in making better. Nor would I ever suggest otherwise.

In your mind I may be nothing but an input into your total utility function, but there's no reason for you to expect me to care about maximizing it.

Fair enough. I am somewhat curious as to what "it" you plan on making better. Also curious as to why this fork "isn't the kind of fork that hopes eventually to be folded back into the original." That, specifically, just reads bitterly.

Also, sadly, at the moment none of this is any real input to any utility I control. I have used Scala in the past. I tried setting my plans with Lift, but that didn't go over well with my coworkers. So, as of now, I am merely on the sidelines. And, do note that I am not trying to demand you not do this. Just saying from my vantage point, I'm not at all clear on what this is improving.

I have not the knowledge to make an opinion on this topic but that last line is a really cool statement, what a way to put it :D

The Scala community isn't toxic.

There's been drama and each time the community has moved on. Paul, Tony Morris and probably others from before I started paying any attention. Even with this recent "drama", after thinking about it for a few days, I've come to welcome it if anything. Regular Scala can shift its focus to becoming a conservative language while Typelevel acts as the incubator. If the two meet their compatibility goals, everyone wins.

I'd also argue that "constantly making waves" is an overstatement. Scala just celebrated its tenth birthday. How much drama has there really been in this community over ten years? For the most part, I've found it to be very supportive. My interactions are almost entirely just on the mailing lists but I've seen few issues. Maybe I'm just blind to them, who knows.

I recognize that tensions within the community are high but I don't currently believe that they present an insurmountable challenge to Scala's future.

"Constantly making waves" is probably more accurate from the days back when Tony Morris was active on the mailing lists. Paul, I believe, also made a fair bit of waves back in the day, but for some reason his were always much more palatable. (He has a very good writing style and is never, that I really remember, flat out mean.)

I guess the big waves I remember are essentially about a post a week from Tony. The hoopla around Colebourne's opinions on the language[1]. And then the mystery/whatever around Pollak's involvement in the community.[2]

The later point is odd just for how much traction lift seemed to be generating, and then the overall community appeared to reject it heavily. Do note that I would still recommend it. Their community is quite nice and helpful.

And I should definitely make clear that it is very possible I just don't see the waves in other communities. I don't really see Scala's anymore; this week being a notable exception. To me, though, high tension is not exactly a good environment. Heck, for all of the flack he gets, Torvalds is usually more cordial than many of the threads I remember from this community.

[1] http://blog.joda.org/2011/11/scala-feels-like-ejb-2-and-othe...

[2] http://blog.goodstuff.im/yes-virginia-scala-is-hard


You are absolutely right.

The usual Scala-hate-brigade will jump on this "smoking gun" and will build a few new talking points on top of it how Scala will fail definitely this time for sure ... but outside their bubble nobody cares and just moves on shipping software in Scala.

I hate to call someone out like this, but to be perfectly honest I don't think your tone helps matters much.

Stop attacking the people who don't like Scala (real or imaginary). Disagree, fine, but this rampant fanboyism is odd. Yes, the language has a few critics on HN whose critiques are mostly FUD. Argue against the FUD but when you attack them you only cheapen your own position.

I'm just trying to say that there's a way to be effective about this.

(I realize I'm attacking a person about attacking a person, I get it)

Thanks. I guess I sound more serious than I actually am.

I find it kind of funny that we have like usually one username which gifts us with his presence in every Scala-related topic for usually ~6 months and then disappears.

Either it's the same guy who just changes accounts like here: http://www.reddit.com/r/scala/comments/1sdmdq/sockpuppet_acc... http://www.reddit.com/r/scala/comments/25kwb1/cedric_beust_c... or it's a series of people all completely unaware that dozens of earlier crusades failed.

Both options are amusing. :-)

Come on. Scala is a big tent language that attracts people from a wide variety of ideals, which invites some amount of arguing. Also, Martin tends to hire independent thinkers, which is good and bad.

For the record, martin has never hired me for anything. I co-founded a company with him.

I know nothing about type safe, which is way after my time.

I also would like to see how this goes though he does not seam to be taking this step.

The thing is that it's much worse everywhere else, the Scala devs just work with it in a more transparent way.

Your ability of denial is quite impressive but looking at your posting history, it's actually not surprising at all. You seem to have quite a thing about Scala and hating pretty much anything that's not it.

Java is at least as transparent as Scala in that respect: every single feature that was shipped as part of Java 8 has been discussed and decided openly on mailing-lists. Everyone knew exactly what was going to be in Java 8 (including what was not going to be shipped) which is a far cry from Scala's operating mode of adding features to the language and then retroactively creating SIPs to give them an air of legitimacy.

I'm siding squarely with Paul Phillips there: I don't have a lot of faith in Typesafe to carry Scala forward any more.

> Java is at least as transparent as Scala in that respect: every single feature that was shipped as part of Java 8 has been discussed and decided openly on mailing-lists.

You are either completely deluded or never actually read the mailing list.

But hey, whatever floats your boat. I enjoy watching your desperateness. Really, if you keep posting your talking points in every remotely Scala-related topic, Scala will go away for sure. Really, I promise.

What is worse? I mean, I can understand complaining about speed of feature uptake. But... stability seems pretty good pretty much everywhere else.

That is, my complaint here is that the platform is unstable. Thus making it scary to adopt. How is that "worse" everywhere else?

> stability seems pretty good pretty much everywhere else

Stability is pretty good in Scala, too.

Maybe not "nothing changed since 1995"-Java, but better than C#, Python, Ruby, OCaml, Haskell, etc.

"he doesn't give any specific reasons why he created this fork"

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.

The type systems broke him.

Can anyone more familiar with the matter tell me what is wrong with the parallel collections? Does he plan to reimplement them in a more maintainable way? Or do away with them altogether?

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.

For a short answer to the first question, see his slides on the collection library[0], particularly number 42. The gist is that the Scala collections have too many dimensions (mutable/immutable, sequential/parallel, strict/lazy), all of which share code -- but it turns out that the right implementation for a lazy immutable parallel collection is not necessarily good for a strict mutable sequential collection, and juggling all these variations makes it much trickier to modify or reason about the code. He seems to be fine with the existence of parallel collections, but probably as something that lives on top of the standard library instead of being layered into it.

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...

Paul, why do you say it's wrong that Float(Long.max - Int.max) is equal to Float(Long.max)? Float has less than 32 significant binary digits, and Long.max - Int.max has the same MSBs as Long.max. You would need to use Double to see the difference. I'm not sure what implicit conversions/promotions have to do with that - you want a warning or error when going from Long to Float? That would be reasonable. You can even lose significant digits between Int->Float and Long->Double even though they have the same total number of bits, so you could require those to be explicit. (from a slide in https://www.youtube.com/watch?v=TS1lpKBMkgg )

> Paul, why do you say it's wrong that Float(Long.max - Int.max) is equal to Float(Long.max)?

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.

Is the name "Policy" a pun on "Paul SC" (Paul's Scala Compiler)? Or is there another meaning?

That's what I thought, and it's clever.

It appears to be a fork of the compiler not the language itself.

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.

> It appears to be a fork of the compiler not the language itself.

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.

There actually is a recent spec, although I'm not sure if it still needs some updating. http://www.scala-lang.org/files/archive/spec/2.11/

There is "a spec" yes. Now let's see someone implement a compatible implementation based on that. We're not talking about fiddling at the boundaries here. For instance type inference is completely unspecified. There is no aspect of scala compilation which is not heavily influenced by how type inference unfolds, yet there is nothing. And that is the tip of the iceberg.

If you're always hearing about how amazingly small scala's specification is, now you know why.

He started on his own standard library a while ago:


Shouldn't this be called Standard Scala?

Too soon?

Or "Enhanced Scala Compiler System"?

Will eventually become Common Sca.

Wait.. is it called policy?

That's going to be a nightmare to Google

Almost as bad as 'play' (which has largely fallen back to 'playframework')

Thank goodness you can search "golang" for things related to the go language. That's sometimes a nightmare too.

Unfortunately this SEO justified change has permeated the community and now people call the language "golang" instead of "Go".


Go is a terrible, terrible name.

Golang is a terrible name.

Agree. Still vastly better than go.

Yeah, maybe he should call it Paulicy.


Judging from the readme, it seems that unGoogleability might be a feature.

Why are parallel collections an "albatross"? I can understand it if he plans to replace the functionality you get by writing "list.par.map(func).seq" with "list.parmap(func)" or something, though. Parallel list functions are one of my favorite features in Scala, and I think it would be a serious loss if they disappeared.

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.

It's not a question of whether they should exist at all but of whether they should infiltrate the collections hierarchy to the extent that someone has to maintain code which looks like this. And there's plenty of it: this is only an example.

  trait ParIterableViewLike[+T,
                            +Coll <: Parallel,
                            +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]

Well, that's a pretty good reason to fix something, I agree. But what are your thoughts about Dotty? I assume it's insufficient for you, but is Typesafe going in the right direction here, is it not relevant to what you are doing or will it make things harder?

Dotty is unlikely to attain relevance - for me or as a future version of scala - because there's no reason to expect it to be any less of an implementation nightmare than is scalac. It is being written by the same person, applying the same engineering standards and the same checks and balances, so starting with a less unsound type system isn't going to matter.

I worked on scalac for two years, so I know most of the same warts and issues; I also have had my differences with Martin in the past. But you know what: he has been courageously innovative and has come up with code that works pretty well considering the risks taken for Scala. Most people would have thought what Scala was trying to do was impossible (combining FP and OO with type inference? But semi-unification is undecidable!). But he did it, and you know what, scalac isn't that bad either. Heck, I've done much worse, but the point is to just keep trying.

You want everything to be a nice well understood package because its "easier that way?" But sometimes it isn't easy and the code isn't pretty; not because the programmer is horrible, but because the problems are hard and not very well understood. Does that mean we should shy away from the problems and just do something safe and conservative like C#? If everyone thought like this, we would make no progress.

Kudos to Martin for being fearless, and let's hope he doesn't cave.

That's right, I'm the stodgy conservative one and martin is the fearless innovator. Where is this version of the movie playing? I'd enjoy seeing it.

Your second paragraph lands somewhere between completely wrong and "not even wrong" if it is supposed to have some bearing on the matter. You don't appear to know the first thing about what I've said, what I've done, or what is really going on here.

Reflexive loyalty of this kind, unhinged from any objective reality, is what has brought us today's scalac. You should reconsider whether your having worked on the scala 2.7 eclipse plugin nearly a decade ago qualifies you to take a position on this. Then to position martin as the scrappy underdog - "let's hope he doesn't cave" - just let us know when the novel is finished, and I hope it's better than the movie.

You are right, I don't know you beyond these online interactions. I was giving you the benefit of the doubt, but you sound very vindictive, and I get it, you know stuff. Building and designing things is a journey, it won't be perfect unless you set your expectations low.

I didn't just work on the scala plugin, I changed scalac to be completely incremental at the AST level (better than everything being a Diff[T]), which was no easy feat (nor did it last, but it worked and became its own tech [1]). I've dug deeper into scalac front end code (Typers, namers, parsers) than most scalac devs have; I know Martin's style very well as a result.

[1] work on making scalac incremental eventually led to http://research.microsoft.com/en-us/people/smcdirm/managedti...

I am intimately familiar with your work on scalac, and that's all I can bring myself to say about that.

You and miles must be best friends. Its fine. Phew, really glad to be out of the Scala community at this point, it just wasn't worth it to being around those people.

Paul and I don't see eye to eye on many things, but on this we're in complete agreement.

So is life. Its great to see that you fixed the plugin and it works very well now. Congrats!

I'm just glad to be out of it. The Scala community really was becoming toxic, sleeping was hard. Hopefully you guys have all resolved your differences now and things are more harmonious.

As a recovering former C++ programmer, that reminds me of the verbosity of C++ meta programming...

Which language have you moved to?

The collections library itself is probably one of the worst things about scala.

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.

Why do you feel that it is a failed experiment? As a user of the collections, it seems to me to work out. Is it more of a problem with the implementation of the collections?

I should have added that despite me not liking the std lib collections library, it's still stands above all other collection libs I've used in other languages.

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.

Agreed. There is a vocal minority of people (academics mostly) yelling at how subtype polymorphism is broken and unusable. It certainly has broken aspects (with respect to equality) but by and large, it's extremely usable, intuitive and it enables powerful abstractions. The corner cases where it falls apart seem to be irrelevant for most uses.

I like dynamic dispatch. Having code which suddenly changes the implementation based on type ascriptions is just not what I want in this case.

Apart from that, I think collections can be improved considerably even while keeping dynamic dispatch.

What is the goal of Paul Philips? He is obviously frustrated by his experiences at Typesafe, but what does he really want? Show us that he can do better? Create an alternative Scala? This seems not be realistic and he seems to be realistic enough to know it. All this sounds like emotional actions from a disappointed ex-lover.

Paul, if you read this: why don't you do something completely different? Leave Scala and your personal rage behind.

Heh +1 to `trailing commas! I think that's the only "feature".` I don't know why they were removed in the first place.

Because the one thing Scala is missing is more ways to do the same thing.

Same things? I don't know what you mean, It was a language feature back in the 2.7 days I think? I was a long time ago, hard to remember when they got rid of it. It's really nice for this:

  val color = List(
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) :

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.

> It's one of those minor QOL improvements where I don't see what the downside is.

That's a nice example why 99.9% of developers out there should never design a language.

You really like to insult everyone who disagrees with you, don't you?

Great explanation!

The "A Fork!? You Should Improve Scalac!" section is delightful.

What the hell is going on? We're in the middle of a major investment into Scala, and now there's forks left and right, both amicable and not-so-amicable. This doesn't inspire confidence, although I'm still classifying it as growing pains/healthy lively ecosystem. I really don't want to stick with Java 8.

Nothing really is going on. The Typelevel "fork" of Scala would better be called an extension or an experimental playground. They have broadly the same goal as Odersky for Scala but want to get there faster. They intend to remain compatible with Typesafe's compiler and Typesafe intend to merge their changes back.

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."

Clojure isn't forking...

But it also doesn't offer many of the benefits and much of the functionality that Scala offers. A familiar C-like syntax, static typing, and so on are very important for a lot of Scala's users.

I don't get that outcry and panic inside the Scala community. We should give the 2 forks a chance and see what it leads to. There is still the chance then to reunite the community behind "one" scala. Also they could have great influence on Typesafe Scala. As far as i know the compiler (which is not very much): The 2 forks will anyway not move away from Typesafe scala at huge speed.

Let's come here again in 6 months and see where we stand.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact