News for hackers. Stuff that matters.
Re:I was wrong, reflecting on the .NET design choices by paulddraper on Friday April 21, 2017 @07:16PM (#14170187)
Things that have CLR-like generics work on the CLR. Anything else doesn't. E.g. Scala.
Re:I was wrong, reflecting on the .NET design choices by emodendroket on Saturday April 22, 2017 @06:20AM (#14171849)
I don't really get the complaint. Even if they had type erasure you couldn't use Scala in the CLR because nobody has written a CLR target. And on the other hand, I don't know why there couldn't be a Scala implementation with true generics. A lot of crap like DummyImplicit and ClassTag is there for no other reason than to work around those limitations anyway.
Re:I was wrong, reflecting on the .NET design choices by broiledegg on Saturday April 22, 2017 @12:15PM (#14173179)
I think it's largely an urban myth.

All expressive languages whose type systems don't have a 1-to-1 equivalence in the runtime's type system need to employ some degree of erasure.

The distinction between "erasure" and "no erasure" doesn't make much sense. It's always just about more (CLR 1, JVM < 10) or less (CLR >= 2, JVM >= 10) erasure.

Re:I was wrong, reflecting on the .NET design choices by emodendroket on Saturday April 22, 2017 @06:49PM (#14175313)
I don't see how you figure. In C# List<string> and List<int> are two different types at runtime.
Re:I was wrong, reflecting on the .NET design choices by broiledegg on Saturday April 22, 2017 @07:02PM (#14175367)
And ...?
Re:I was wrong, reflecting on the .NET design choices by emodendroket on Saturday April 22, 2017 @09:44PM (#14175970)
If you're implementing a CLR language and want flawless interop with everything then you just have the constraint that you need to support generics in the same way that other CLR languages do. I'm not seeing why this model is so much worse.
Re:I was wrong, reflecting on the .NET design choices by paulddraper on Saturday April 22, 2017 @04:54PM (#14174728)
Scala had a CLR target for a number of years, but getting the type system to work was so problematic it was eventually abandoned.
Re:I was wrong, reflecting on the .NET design choices by broiledegg on Saturday April 22, 2017 @07:01PM (#14175364)
That's what I meant with: "That's largely an urban myth."
Re:I was wrong, reflecting on the .NET design choices by emodendroket on Sunday April 23, 2017 @01:27PM (#14179172)
I'm curious in what sense it was difficult to get it to work.
Re:I was wrong, reflecting on the .NET design choices by paulddraper on Sunday April 23, 2017 @03:17PM (#14179881)
Perhaps not the best explanation but this the gist, as given by Scala's creator in an interview https://youtu.be/p_GdT_tTV4M

> It's harder then it looks, because .NET has a very rich type system which happens to be not the Scala type system. In fact, it's very hard to map some of the parts of the Scala types like higher-kinded types...so it's a difficult task, much more difficult than JS or LLVM. LLVM is likely going to be the third target [after JVM and JS] because there we don't need to fight a type system which is foreign to us, which is what the .NET one is.

Re:I was wrong, reflecting on the .NET design choices by noblethrasher on Friday April 21, 2017 @10:01PM (#14170751)
F* has an advanced type system with support for dependent types and refinement types. Yet, it runs on the CLR.

Source: https://www.fstar-lang.org