Paul Dunn wrote:
On Sun, Jun 19, 2011 at 1:15 AM, Skybuck Flying <skybuck2...@hotmail.com> wrote:

Here is a new language idea which would make Delphi a bit more friendly:

Do the Embarcadero developers read this list?

First the problem:

pointers and longwords are not assignment compatible.

This is pretty much bullshit because they are the same size.

Unfortunately pointers are not the same size as longwords on some
architectures - on x64, they're twice the size.

The size is irrelevant. Pointers and numeric types have different sets of applicable operators, in the same way as bitsets and numeric types have different operators. You can add two numbers and get a meaningful result, you can't add two pointers or bitsets.

There's a fairly old book on linkers and loaders which uses the analogy that pointers are like vectors and integer types like scalars, and then explores the various combinations of operators etc.

Whether it would be desirable to have some construct that allowed assignment without a warning is, of course, a different matter. But at that point, in the general case, one has to consider that different architectures assume different pointer behavior, such as the normalised pointers assumed by Turbo Pascal- with which FPC still has some interest in being compatible.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to