[fpc-devel] Local procedures as procedural parameter
Michael Van Canneyt
michael at freepascal.org
Mon Mar 14 11:50:58 CET 2005
On Mon, 14 Mar 2005 olle.r at automagika.se wrote:
>> No, because in this case, you are comparing 2 basically different
>> programming
>> techniques: OOP and linear; they are fundamentally different in their
>> practical use.
>
> The iso feature supports a third, namely recursive programming, which has
> been forgotten after C took over the world and introduced its assembly
> style programming.
>
>> I don't see much code out there which mixes the two.
>> (I'm talking 50-50%, not 99-1%)
>>
>> Beware:
>>
>> I want to make clear that I am not against the concept "an sich".
>> If the compiler was born 'out of the blue', and it supported 'iso'
>> procedures from the very start, the problem would not exist. All
>> procedures
>> (local and global) could be made 'iso-aware', and you would be able to
>> pass
>> both local and global functions for the same procedural parameter.
>>
>> The problem is that we are in the situation where the majority of
>> existing code
>
> There is a lot of existing code out there which currently are not
> supported by any live compiler, namely everything written in some of the
> mac pascals. FPC can be the remedy.
I agree, but comparing the market share of Apple and Windows I think
that this codebase is dwarfed by the Delphi code base :)
>> does not work like that, and that we have to introduce a
>> 'schisma' in the compiler. I'm not particularly fond of this idea.
>
> As I see the suggested solution, the iso stuff can be added, without
> affecting existing code.
Please explain the "without affecting existing code" ?
Once more, I don't object to the introduction of this new 'iso' style;
I question it's usefullnes.
I will object against a solution that causes existing code to be altered
in any way, such as an extra hidden parameter for all callbacks. For the
ISO ones, I don't think there is any other way of doing it. As long as it is
restricted to those, there is no problem...
Michael.
More information about the fpc-devel
mailing list