On Wednesday, 29 April 2015 at 17:17:07 UTC, Dennis Ritchie wrote:
Hi,
Is it possible to create simple D user-defined data types without the use of classes and other OOP?

For example, in Ada is done as follows:

-----
type balance is new Integer range -32_000 .. 32_000;


I think you can use struct for this together with opAssign etc. functions in it. So, you can define a new variable that uses 3-bytes in memory example. But for 32_000, I think limitations are based on processor, and not the language.

Reply via email to