I could live with something similiar you proposed, maybe with other
preprocessor keywords like $macro and $expand instead so that it's clear
it's something new. But I fear this is not what most people being pro
macro want: they want something like C and think this will solve all the
C header porting problems. But it doesn't because it doesn't fit into
the unit concept (a C like solution). Further, it adds another language
concept for which I see no need.

Writing debugging info isn't, this can be done by a function taking a
array of const. What's wrong with

procedure dp(const x : string;y : array of const);inline;
  begin
    dbgstr(x,y);
  end;
?

Constants? Pascal has native constants, C hadn't. Poor man's templates?
Well, we have generics, if they lack something, we should improve them.
Repeated code? Pascal has nested functions, most of the time they are
enough and they can be marked as inlined.

I really thing we should first collect use cases and maybe improve
existing solutions if needed instead of opening another can. If the
faculty example doesn't generate good code, the inline folding should be
improved etc. like the possiblity to use inline functions in constant
expressions if the inline function can be evaluated at compile time etc.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to