[fpc-devel] Pure function Wiki page

R0b0t1 r030t1 at gmail.com
Mon Jul 9 16:22:57 CEST 2018


On Sun, Jul 8, 2018 at 4:43 PM, Thorsten Engler <thorsten.engler at gmx.net> wrote:
>> -----Original Message-----
>> From: fpc-devel <fpc-devel-bounces at lists.freepascal.org> On Behalf Of
>> R0b0t1
>> Sent: Monday, 9 July 2018 07:22
>>
>> There were some other comments touching on reasons for or against a
>> keyword, and I apologize for not speaking to them precisely. But,
>> this is why I would like to avoid a keyword - it is redundant.
>
> People keep talking about keywords. As shown in the examples, pure is not a keyword. It's a context-sensitive directive. This is already wrongly stated in the proposal itself (so people can be excused for picking up on the use of the term "keyword" in the proposal) and it should be fixed (in the proposal).
>
> And it's not redundant. You are telling the compiler: I want this function to be pure. Please tell me if I made a mistake.
>

I suppose the language I should have used was "reserved word." After
having been explained that the token would only have special meaning
in function declarations I feel a bit better, but would the
highlighter also be context sensitive? The IDE has a habit of bolding
valid identifiers for I think this very reason, and it is rather
annoying. The supported dialects of Object Pascal is quite cluttered.

That can in part be attributed to the existence of Delphi mode...

I don't want to oppose all progress and think this is a worthwhile
optimization, I would just ask that partially aesthetic issues like
this be considered.

Cheers,
     R0b0t1



More information about the fpc-devel mailing list