On 1/24/2014 3:25 PM, Brad Roberts wrote:
None of this is new. It comes up periodically and ends up in the typical place
of many feature requests, unimplemented. Create the type, share it, see who
uses it and how much they gain from the benefits and if they're worth the
costs. Conjecture will only get you so far.
I'll chime in that yes, you can create your own integral type in D.
You can in C++, too, there is a SafeInt integral type:
http://msdn.microsoft.com/en-us/library/dd570023.aspx
http://safeint.codeplex.com/
It's been around since at least 2004. I haven't noticed it getting much
attention or traction. Maybe it would in D, you can always give it a try.