Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> .NET's type system is quite elegant

What do you think about being able to use Void in Generics? Java's issue of not supporting primitive types pales in comparison to that.

Also, while reified generics and structs are fine, most of the optimizations one would reasonably suspect to be supported are just not there. Some time ago, it was still faster to pass value types by reference ... that's just embarrassing. Maybe RyuJIT does better here?



There are lots of things that could be better, and I don't mean to imply that .NET's system is perfect. But the fact that List<byte> contains an array of bytes rather than an array of much larger objects is often important in practice, and dwarfs any complaints I might have. Not being able to use System.Void in .NET generics is an occasionally frustrating quirk, not a huge problem, in my experience. Indeed, it's quite easy to create a new type with no public constructors to achieve the equivalent result (and F# does this with the unit type).




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

Search: