I had used Scala for many years before trying C#, and I have to agree. The only thing that I really missed in C# were higher-kinded types.
I think I'd miss pattern matching the most.
The first time I saw how pattern matching with regular expressions automatically extracted the matching bits I was sold.
I'd also miss block expressions. I keep wanting to write if-expressions (as opposed to if-statements) in every non-scala language I touch.
But I agree, c#/.net is a good alternative if you're used to the expressiveness of scala.
It is not at the same level as Scala, but C# 7 has pattern matching.
Re:Reasonable Scala Compiler
by devdoomari on Friday August 18, 2017 @12:07PM
(#15047390)
There's F# and then there's "F* " language that seem to have higher-kinded types
(I really mean F* as in 'F-star' language)
Re:Reasonable Scala Compiler
by colefichter on Friday August 18, 2017 @01:10PM
(#15047941)
> 3. Invented async/await, by far the most ergonomic concurrency primitive yet created.
This feels like a bit of hyperbole. The actor model seems much more intuitive than async/await. Indeed, message passing between actors is how concurrency works in the real world (think about how people interact with each other).
Re:Reasonable Scala Compiler
by smitherfield on Friday August 18, 2017 @01:25PM
(#15048070)
I knew I'd get pushback on that one, it is somewhat hyperbolic; I'm here using "most ergonomic" to mean "closest source-level similarity to the synchronous equivalent." Which is perhaps not the "best" way to model concurrency, but has the advantage of being very easy to learn.
1. About the strongest OOP support of any language which doesn’t have a dynamic or Scala-esque exotic type system. Also supports non-OOP imperative, unlike Java.
2. Linq is nigh-on the best FP support offered in any non-FP language’s standard library, and really is one of the best FP libraries period.
3. Invented async/await, by far the most ergonomic concurrency primitive yet created.
4. Fast and easy to tune for performance (stack-allocated value types which can also be passed by reference).
5. If you know Java or C++ you’ll be productive within minutes.