What do you think about LDC contributor "kinke"

WebFreak001 d.forum at webfreak.org
Thu Jul 23 12:33:30 UTC 2020

On Thursday, 23 July 2020 at 10:36:14 UTC, Ewa-D wrote:
> On Thursday, 23 July 2020 at 09:41:55 UTC, Johan wrote:
> If you do not want to improve anything in the compiler, then 
> the question arises, why are you working on it at all?

I see you have ideas for the language, however you need to keep 
in mind that LDC is an implementation of the D specification. 
Changes in behavior would probably go against what is defined in 
the D specification, thus breaking compatibility with other 

If you want your improvements in the compiler to happen, you need 
to first find why your issue happens in the first place in the 
specification. You first need to find out if what you are doing is

defined behavior and implemented wrongly - in this case kinke and 
others would gladly fix it in LDC if you point them to it in the 

if it is implementation defined - in this case you first need to 
find out if this comes from druntime or ldc. Then try to suggest 
your improvements to the contributors and try to convince them 
why you want the change, without breaking backwards 
compatibility, or why it is worth adding a compiler switch for 
that specific need, or

if it is undefined behavior - in this case the compiler is free 
to do anything, don't rely on it. The Changes you suggest are 
useless because they can change any time, instead:

If it's undefined behavior or if it is defined behavior and the 
compiler implements it correctly, you need to find a reason why 
this should be changed in the specification and for example make 
a DIP that suggests the change of the specification in that 
point. Then you need to get the community to agree on changing 
it. This kind of issue has nothing to do with LDC though.

Your issues in the specification:
#3514 - https://dlang.org/spec/expression.html#shift_expressions 
- technically an error from the user/code because it is illegal 
to shift this much. There could maybe be added a flag to add an 
`assert` to every shift expression you do, however I think it 
would be quite bad on performance.

#3516 - https://dlang.org/spec/unittest.html#attributes_unittest 
- order of unittest execution is implementation defined, by 
druntime - not an LDC issue

about #3515: this is CPU dependent. While technically possible to 
have in the compiler, you would much rather want this as a 
library solution for the rare cases where you need this. IMO you 
are performing undefined behavior with the casts (casting the 
void* to unaligned float pointer), however I can't find anything 
about this in the D specification. Alignment requirements should 
probably be specified with a mention to undefined behavior for 
broken alignment mismatch.

More information about the digitalmars-d-ldc mailing list