On 29 Nov 2011, at 19:19, Thaddy wrote:

> There's a documented delphi version: almost complete D7 support *by the 
> compiler* and by now d2006 now almost feature complete.


That only works in one way: the compiler can support most of D7 and D2006, but 
if you check for everything the compiler supports then the guarantee can only 
be that the code will be compilable by D2006. It won't say anything about 
compilation with earlier Delphi versions (unless you add, as Tomas mentioned, 
separate STRICTDELPHI modes for different Delphi versions).

> I am trying to restrict Delphi mode a Little further. Only on the compiler 
> level and only the obvious. Just like it pretends to be the case already.

Delphi mode is not about restrictions. Delphi mode is about changing the 
compiler's behaviour so that Delphi code can be more easily compiled with FPC, 
e.g. different procvar syntax, don't require that parameter lists are repeated 
in the implementation unless you are overloading, allow identifier conflicts 
between fields and method parameters, ... I think most of the changes that are 
not simply about syntax differences, make the compiler in fact less strict 
rather than stricter.

> $STRICTDELPHI is probably a bad name.

It actually perfectly describes what you want to do, be it only regarding 
things that can be checked by only relying on the compiler. I'm not sure 
whether the limited applicability of such a feature (mainly usable if you don't 
use, like you, the standard RTL of either FPC or Delphi) makes it worth it to 
add a ton of small checks sprinkled all over the compiler though.


Jonas_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to