Stefan Koch: New CTFE fix

Johnson via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 16 06:53:40 PDT 2017


On Wednesday, 16 August 2017 at 10:03:56 UTC, Moritz Maxeiner 
wrote:
> On Wednesday, 16 August 2017 at 07:24:36 UTC, Biotronic wrote:
>>
>> When Moritz commented on your use of 'do' as a function name, 
>> that may have been unnecessary for a discussion of your 
>> problem.
>
> I would contend that when discussing semantics (that is the 
> PL's syntax is not open for change as part of the discussion) 
> it's common courtesy to use valid syntax.
> You're right in that it was unnecessary to discuss the issue he 
> was describing, but it was relevant to me as a matter of 
> principle.

No, it wasn't. It was a matter of you ego... and I see your 
buddies have joined the game.

What if I did

void Do() { }

Would you bitch and complain about that?

Maybe the original was a syntax error then and not a "semantic" 
error as you like to call it?

The fact is, the name of the function is completely irrelevant to 
the discussion and you had to make a big deal out of it because 
of your ego.

What if it were pseudo code?

Again, instead proof that either you are an idiot(which I doubt) 
or that you have some need to prove something and will find 
anything to nitpick on. This is far more childish than those 
morons that say I'm childish, and they even agree with me that 
what you did was nonsense... completely irrelevant to the 
discussion.


>
>> 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.
>
> Well, my implementation attempt I linked to earlier [1] passes 
> the auto tester for the test in Stefan's original PR and so far 
> it works as expected in all my personal cases. If you find 
> something wrong with it, please comment on the PR's page :)
>
> [1] https://github.com/dlang/dmd/pull/7082


So, if the people already want what I want, and you already did 
your own pull, why the hell are you saying it can't be done? 
Again, because you are looking for something to prove, and 
calling you out on it is the right thing to do regardless what 
idiots think.

You can make the claim that pragma(msg, ...) happens before the 
ctfe is ran, but again, which pragma(msg, ...)? With CTFE there 
are two levels, the compiler is ran twice, once on the original 
code and once on the CTFE to actually compile it. Just because 
the compiler run's it the first time DOES not mean that should be 
the only way. You talk about semantics but you seem not to 
understand the term well.  A single symbolic name for something 
can have many interpretations. When one, someone like yourself or 
the D compiler, only interprets it one way, it leads to problems.

How out pragmaCTFE(msg, ...)? Is that good enough for you, or you 
will find something wrong with that too? Do you realize that 
there are two levels of compilation going in with ctfe? 
Essentially two DMD's? If there are two dmd's then there are two 
pragma's, is there not? So the arguments you make may be correct, 
you are missing half of the equation and fail to realize that 
because you are trying to prove something rather than enlighten 
yourself.



More information about the Digitalmars-d mailing list