www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - [dmd] Types and ScopeDsymbol

reply drug <drug2004 bk.ru> writes:
Is it true that user defined types are resolved to ScopeDsymbol and 
basic types aren't?
Apr 01 2020
parent user1234 <user1234 12.de> writes:
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.
Apr 01 2020