In our previous episode, Jonas Maebe said:
> 
> > http://www.hu.freepascal.org/fpcircbot/cgifpcbot?channel=fpc&fromdate=2010-08-28&todate=2010-08-28&linecount=50&fromtime=14%3A20&totime=15%3A00&sender=&msg=
> 
> Probably being predictable again:

Don't read too much into that.

> I don't like the ability to change the meaning of keywords using switches
> like that.  It makes code harder to read, because you have to know which
> switches are active before you know what the code actually means.

It is meant to avoid a heavy ifdefed solution which is IMHO even worse. 

It is also meant to avoid the combinatorial aspect.  For calling conventions
you need a separate one for each detail deviation.  Or you need to introduce
separate modifiers for separate aspects of the calling convention.

This includes an ability to keep code depending on current cdecl semantics
running.

> >> Another option is to declare it as "mwpascal" instead of "cdecl". The 
> >> mwpascal calling convention is identical to cdecl, except that all 
> >> structured const parameters are passed by reference (for compatibility 
> >> with the MetroWerks Pascal compiler).
> > 
> > Hey, that's the easiest for me, now. No need to change the compiler. But
> > i'm not sure that this is the best solution for the long run.
> 
> My second preference would be something like constref.

Needs ifdef in every prototype that needs to remain Delphi compat, and that
IMHO makes it an hard sell.

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to