Stefan Koch: New CTFE fix

Biotronic via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 16 00:24:36 PDT 2017


On Tuesday, 15 August 2017 at 16:10:40 UTC, Johnson wrote:
> I'm sorry, but you are obviously someone in *need* to prove 
> something. No need to respond, ever.

You need to grow up.

When Moritz commented on your use of 'do' as a function name, 
that may have been unnecessary for a discussion of your problem. 
Your vitriolic and childish reaction to that though, was not just 
unnecessary, but has done you a massive disservice and is more 
than unlikely to garner goodwill from others on the forum.

Your opening post shows that you have little understanding of how 
the compiler works. There is nothing inherently wrong in this, 
but your utter failure at absorbing the information Moritz made 
available to you indicate you have no interest in attaining that 
understanding.

With your hostile words and disinterest in learning, you have 
doomed what might have been an interesting discussion.

Simply put, there are reasons why pragma(msg, x); fails in your 
example, and while in that specific example it would be 
possible[1] to change the compiler so that it would work the way 
you expect it to, that's not possible in the general case, and 
would be too much work for too little a gain to cover the cases 
where it's possible.

Your example is obviously a toy example, so we can't really help 
you in figuring out how to work around the issue you may be 
having, but I expect enum to be of help, and that a good 
factoring of functions should give testable units that can then 
be inspected with pragma(msg). That is, until we have a 
functioning __ctfeWrite in druntime. The function is already in 
druntime's object.d, and is just awaiting an implementation[2]. 
That implementation will possibly have to wait for Stefan's CTFE 
makeover to complete.

[1] But not necessarily easy.
[2] https://github.com/dlang/dmd/pull/6101

--
   Biotronic


More information about the Digitalmars-d mailing list