Forum > Suggestions

I do not like ^

(1/6) > >>

Fred vS:
It is a message for the High Authorities of the Pascal Academy.

I have a great respect for your language, but would it not time to take it completely ? Be brave and waive these legacies competitors.

Please, forget:
^variable
pointer^
@variable
(All are terrorizing our children)
 
and adopt:
DeRefPtr(variable)
RefPtr(pointer)
PtrtoVal(variable)
(Who are much more "Pascally").

Here example of "mixed" Official Pascal code (given by Mr Blaazen)


--- Code: ---VAR W : Word;
    P : ^Word;

BEGIN
   W:=10;
   P:=@W;
   WriteLn(P^);
   W:=30;
   WriteLn(P^);
   P^:=80;
   WriteLn(W);
END.
--- End code ---


and here the same code in "real" Pascal mood :

DeRefPtr(var) ----> ^var;
RefPtr(ptr) ----> ptr^ ;
PtrtoVal(var) ---->  @var ;


--- Code: ---VAR W : Word;
    P : DeRefPtr(Word);

BEGIN
   W:=10;
   P:=PtrtoVal(W);
   WriteLn(RefPtr(P));
   W:=30;
   WriteLn(RefPtr(P));
 RefPtr(P):=80;
   WriteLn(W);
END.
--- End code ---


Your obedient servant.

Fred vS

Leledumbo:
Read this, Niklaus Wirth never invented Pascal with caret as the pointer dereference operator, it's our current keyboard that doesn't have the required symbol. And for you, symbolphobians, please stop doing something silly regarding the symbol. You have triangles everywhere: boomerang, underwear, arrows, etc. all have nothing to do with terrorism.

taazz:
It is not a literal terrorism as in bobs and suicide bombers it was more like "terror from beyond" "nightmare on elm street" or "chainsaw" type of thing.

Fred vS:
@ Leleldumbo
--- Quote ---Read this,
--- End quote ---

Very clear, maybe the clearest explanation of Pascal concept i have read.
This man is genius.

User137:
The symbol ^ is fine, but i think i have to agree with Delphi's philosophy with it. When i have pointer to a class or record variable, i shouldn't need to use:
recordVarPtr^.Property but just recordVarPtr.Property
Because there is no other possible outcome from it than writing it with just dot. All i can see is that it makes it clear that we are dealing with pointed value. Pointer itself is just a memory address, there's no mistaking the dot usage for meaning the value only.

Navigation

[0] Message Index

[#] Next page

Go to full version