[fpc-devel] Macro Processing
fpc at mfriebe.de
Mon May 16 16:35:24 CEST 2011
On 16/05/2011 15:18, Joerg Schuelke wrote:
> It is not only
> the weakness, it is the power too. Will think about.
weakness and power are not necessary opposites, or exclusive.
and btw, allow me the rhetoric (though not as the means of an argument,
since it isn't good style):
you know what they say about power? power corrupts.
> Am Mon, 16 May 2011 14:41:35 +0100
> schrieb Martin<fpc at mfriebe.de>:
>> The more support there is for macros, the more likely people will
>> start whole libraries of macros.
>> first just a lort of small harmless helpers. Then combinations there
>> of... it grows, and then it becomes cancer (grows to something not
> Intended by whom? Good, me? I do not see the situation that black, if
> it will turn out to be cancer, why is that C not death.
"Cancer" may not have been a good term, to keep the discussion clean.
But it doesn't have to kill something, just make it harder to live with
it. And often C (if used with lots of macros) is by far harder to read,
than pascal (that doesn't have macros).
Is it so far fetched, that someone who has a lot of procedures that all
procedure Foo1; // number may change
FooNum = 1;
Obj1a, Obj1b: TObject; // again number changes
Obj1a := TOPbject.Create;
Obj1b := TOPbject.Create;
// now some code that changes
may end up with a macro for the whole opening and the whole end, and
that those macros, are just combining individual other macros.
and then just write
// the code in thr try finally block
I can see that happen very easy?
And there we are, Pascal would be down to where C is now.
But as I wrote.
all those Arguments yours and mine are both correct. That is not the
The question is, which one to give the higher importance.
And we will bot apply our subjective view. And this will not be changed
by arguments that easily.
We both know the risks and advantages they have (I do not deny that they
are powerful tools)
The difference is:
You are willing to take the risk, to get the power.
I am not willing to be exposed to the risk, so you can get the power.
=> see my other mail, about them being used n 3rdparty open source, add
ons, etc => if they exist, I (and everyone) will be confronted with them.
More information about the fpc-devel