Stefan Koch: New CTFE fix

Moritz Maxeiner via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 16 07:58:14 PDT 2017


On Wednesday, 16 August 2017 at 13:53:40 UTC, Johnson wrote:
> 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.

Refer to my post clarifying that (ambiguous) sentence.

> It was a matter of you ego... and I see your buddies have 
> joined the game.

I see ad hominem attacks remain your favorite response :)

>
> What if I did
>
> void Do() { }
>
> Would you bitch and complain about that?

If you actually bothered to not only read my post but actually 
think about it, then you would realize that the answer to that 
question is "I neither bitched nor complained about the first 
one, I wouldn't about the second one, either".

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

I have not written about semantic errors so far. Regardless, yes, 
as I pointed out it was a syntax error.

>
> The fact is, the name of the function is completely irrelevant 
> to the discussion

As I pointed out, I consider it common courtesy to use valid PL 
syntax when discussing semantic issues.
Even if I didn't, it was still an error.

> and you had to make a big deal out of it

Interesting (and frankly amusing) how you attempt to twist things 
around. All I did was neutrally point out the invalid syntax; the 
disproportionate emotional response including ad hominem attacks 
(also known as "making a big deal out of it") was all you.

> because of your ego.

Again with the ad hominem, also pure speculation.

>
> What if it were pseudo code?

Then I wouldn't have pointed it out as a syntax error. The 
context, however, made it quite clear it was not 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.

You emotional outburst is misplaced. If you don't want factual 
mistakes pointed out, refrain from engaging in technical 
discussions.

> This is far more childish than those morons that say I'm 
> childish,

Ad hominem.

> and they even agree with me that what you did was nonsense...

a) So far one other person has responded, not multiple
b) Did you read the same post I did? Because that post wrote "may 
have been unnecessary", which is not the same as "was 
unnecessary". Even assuming that he did mean "was unnecessary" is 
not the same as "nonsense". Even assuming he did mean "nonsense", 
I already explained my reasoning.

> completely irrelevant to the discussion.

See above.

>>
>>> 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,

They don't, you *explicitly* wanted `pragma(msg, ...)` to work.

> and you already did your own pull, why the hell are you saying 
> it can't be done?

pragma(msg, ...) != __ctfeWrite
Which you would know, if you actually read the compile time page 
by H. S. Teoh I linked you earlier :)

> 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.

Ad hominem.

>
> You can make the claim that pragma(msg, ...) happens before the 
> ctfe is ran, but again, which pragma(msg, ...)?

It's not a claim, it's a fact.

> 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.

You really should read that page I linked to earlier.

>
> How out pragmaCTFE(msg, ...)? Is that good enough for you, or 
> you will find something wrong with that too?

Renaming pragma to pragmaCTFE doesn't change anything, because 
it's still a pragma and pragmas in a function body are handled 
before the function body is interpreted at CTFE.

> 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.

This is essentially a repetition of the paragraph two quotes up, 
combined with ad hominem.


More information about the Digitalmars-d mailing list