5 ms·
I 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 i
by agbell 5y ago
I 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?
- darksaints 5y agoThere are plenty of IDE features that get released at the same time as a language feature, or shortly thereafter. Implicits were not like that.
- 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.