3 ms·
Yeah I realize there are more efficient aliases, but even so - just defaulting immutable data structures with only primitive types in them to cretae reference t
by alkonaut 10y ago
Yeah I realize there are more efficient aliases, but even so - just defaulting immutable data structures with only primitive types in them to cretae reference types feels like a massive foot gun performance wise. I couldn't imagine doing C# without value types, so for F# where things are usually more immutable, it has to be painful if e.g. a normal point(x,y) record is a class...
- justneedvodka 10y agoYou could use a struct, record, or tuple for a point. I've done all of these before.
- alkonaut 10y agoYes, and now they can be done right (as CLR structs)! It's just odd that this took until now. I suppose it just shows that those of us that are using .NET to do "C++ work" (always CPU and GC bound, almost never IO bound) are pretty few...