Good examples of value types
via Digitalmars-d
digitalmars-d at puremagic.com
Tue May 5 13:40:58 PDT 2015
Hi,
For a comparison with the Java language, I'm trying to come up
with some good examples of custom types that should be value
types (but that must be ref types in Java). I think the most
obvious ones are numeric types. So BigNum, MyNum, etc. are good
examples because programmers are used to numeric types being
value types, and having them suddenly become a ref type just
because it's MyNum instead of long is really annoying. Still,
could you come up with some type that would really benefit from
being a value type but that isn't numeric (or otherwise similar)?
Thanks for your help!
Luís
More information about the Digitalmars-d
mailing list