Operator declaration

Nick Treleaven nick at geany.org
Fri Apr 24 14:59:25 UTC 2026


On Thursday, 23 April 2026 at 20:30:04 UTC, Meta wrote:
> Now that we have ImportC, maybe he he can be convinced to 
> soften his stance a bit.

Just to note that there are rationale points for integer 
promotions here, in addition to ease of porting C:
https://dlang.org/spec/type.html#integer-promotions

`op=` is supposed to work without error:
https://dlang.org/spec/expression.html#assignment_operator_expressions

> His argument is that people will paste C code into a .d file 
> and expect it to work the same as in C. However, now they can 
> just take that C code and compile it directly with DMD, and use 
> it seemlessly from D. So IMO his reasoning doesn't hold that 
> much weight anymore.

What if you want to port the C code to D so you can refactor and 
develop it using D features?


More information about the Digitalmars-d-learn mailing list