[fpc-devel] Could FPC add the PLM "based" construct?

Giuliano Colla giuliano.colla at fastwebnet.it
Mon Nov 16 16:39:09 CET 2009

Micha Nelissen ha scritto:
> Giuliano Colla wrote:
>> With "absolute" you need a) to declare an extra type (PByte, or 
> "Declaring an extra type" is one of those things that make Pascal what 
> it is; declaring before use.

You mean that declaring "twice" is smarter than declaring just once?
You need two declarations: one for the type of the typed pointer, and 
one for the typed pointer itself. The Pascal type is visible in the 
pointer type declaration, and not in the pointer declaration (which is 
in a different section, var vs. type, which in a large program can be 
quite far away).
I hardly see the point.

>> whatever), b) to explicitly access the variable through the pointer 
>> (PBfoo^ as opposed to foo). But if the variable is an array or a string, 
> So we're talking about saving typing of a '^' ? Explicitly typing a '^' 
> when you're derefencing a pointer makes the code more readable, not less.

You mean that string or object references where pointers are implicitly 
dereferenced make the code less readable?
A MyString^[3] or a MyButton^.Click would be more readable than the 
current MyString[3] and MyButton.Click?
It would be more consistent with the rest of the language, but what I 
suggest is to push consistency on the opposite direction.

Giuliano Colla

Whenever people agree with me, I always feel I must be wrong (O. Wilde)

More information about the fpc-devel mailing list