[dmd] Types and ScopeDsymbol

user1234 user1234 at 12.de
Thu Apr 2 06:48:58 UTC 2020


On Wednesday, 1 April 2020 at 18:47:38 UTC, drug wrote:
> Is it true that user defined types are resolved to ScopeDsymbol 
> and basic types aren't?

a basic type does not need to introduce a scope since it has no 
members. All operators on them are supported natively and are no 
modifiable, so yes certainly.

 From that (here I go OT) we can imagine a version of D with no 
basic integer types but just ubyte, and everything would be 
handled with operator overloads. All the other numeric types can 
be expressed using ubyte[<someLength>] in some structs, although 
not very convenient for the C interop.


More information about the Digitalmars-d-learn mailing list