11 ms·
I'm so psyched about this. I've followed the development of Scala 3 for pretty much the whole voyage, and I think they've done an incredible job bringing the co
by acjohnson55 5y ago
I'm so psyched about this. I've followed the development of Scala 3 for pretty much the whole voyage, and I think they've done an incredible job bringing the community along through some pretty radical changes to the language. It has definitely not been an easy process herding a community with very big, informed, divergent opinions on the language.
In the end, I think they did an awesome job. Many, many sacred cows of old Scala were confronted. I think the result is a much more approachable language, where simple things are easier.
- agbell 5y agoI totally agree. I love the direction of Scala 3. This quote says it all I think: "Scala 3 takes a slightly different approach [from Scala 2] and focuses on intent rather than mechanism. Instead of offering one very powerful feature, Scala 3 offers multiple tailored language features, allowing programmers to directly express their intent" So rather than something like implicits, that can be used N different ways, only 2 of which are practical, Scala 3 adds those 2 features explicitly. https://docs.scala-lang.org/scala3/new-in-scala3.html https://docs.scala-lang.org/scala3/new-in-scala3.html
- swader999 5y agoThe days I spent chasing implicits are still lost to me forever.
- darksaints 5y agoThey should have never been a language feature before IDEs were capable of working with them and exposing them. Luckily they do now...but Scala 3 makes it so that understanding them with a simple text editor is much easier. The fact that they have to be imported in a way that acknowledges their usage is a simple but important way to ease that burden, and the distinction between `given` and `using` is extremely helpful for understanding them.
- agbell 5y agoRumor has it Kotlin was inspired by frustrations getting Scala edge cases to work in IntelliJ.
- valenterry 5y agoI don't believe that this is true. Because, one can just write simple Scala and has pretty much everything that Kotlin has (minus its nullability magic) and never deal with these edgecases. Even compiletimes are decent then. But with Kotlin, it is actually enforced that the more advanced features of Scala are not available, so it makes sure that compiletimes etc. stay short. It also simply reduces the burden of the IntelliJ devs, because it's not just "Language -> IDE" but IDE capabilities impact how the language is designed too. And having a good IDE is very important for productivity.
- adamgordonbell 5y agoI love Scala. The thing is as an IDE author you can't just "write simple scala" because you aren't the author, you are the IDE. You have to be able to offer your refactoring tools and other tooling for all of it and cover all the edge cases. LSPs do remove this problem to a large extent though.
- valenterry 5y agoI think I understand your posting now - what you are saying is exactly what I mean, but it's of course only true for IDE developers. And actually, I'm not sure if LSPs help so much. To my knowledge, IntelliJ still uses its own compiler to support the user at least partially of the code is incorrect and doesn't compile.
- ovis 5y agoDo you think IDEs would have grown support for them before they were a language feature?
- 5y ago
- seertaak 5y agoI'm a programming language design geek... Out of curiosity, could you explain some of the ways you've been bitten by implicits?
- alexfoxgill 5y agoI will never forget the hours I lost debugging an issue where I had not realised that if you declare any variable in scope that coincidentally has the same name as an implicit that you're relying on, the implicit will be shadowed and unable to resolve. Of course, it 'makes sense' when you consider that you would be unable to refer to it by name explicitly... But if you're not using the name, the fact that it can have an impact on visibility is pretty confusing
- nautilus12 5y agoI always felt like implicits were a weaker design in the language, glad to see they put some more thought behind it.
- acjohnson55 5y agoIt was a brilliant concept, but the ergonomics weren't great. It was like working with the lambda calculus. Sure, you can literally model anything, but it's not intuitive to most people.
- Buttons840 5y agoWhat's an example of something they made more approachable? One of my first impressions of Scala, which I have barely seen, and do not know, is that there is a lot of syntax. Has anything been done to help with that? I don't think syntax matters much, but it's one of the only impressions I have of the language and wanted to ask about it.
- OOPMan 5y agoThat's an interesting take, as someone that's used Scala for a while I feel like there actually isn't that much syntax. I guess my perception is warped :-)
- valenterry 5y agoI agree. But Scala still does certain things different, so to a Java or python dev it _looks_ as if there is a lot of syntax. Just like Haskell looks strange when you look at it for the first time.
- tormeh 5y agoI don't think people object to the language syntax itself, but rather the unfamiliarity and randomness of language conventions. Haskell/Perl/K/Scalaz is full of line noise I can't be bothered to learn, for example
- patrickthebold 5y agoScala has a lot of 'sugar': f(...) becomes f.apply(...) matching calls unapply with some various binding. Some parenthesis are optional: Some(1,2,3) is Some((1,2,3)) optional . so a + b is a.+(b) colon changes associativity, so a +: b is b.+:(a) for expressions become, map, flatMap, filter, withFilter and forEach, according to various rules. def f[A: B]() adds an implicit parameter of type B[A] I'm sure there's more but that's the top of my head. Of course it's not actually a long list, but none of that is obvious for a newcomer.
- 5y ago