[fpc-devel] Syntax problem with function result
Jeppe Johansen
jepjoh2 at kom.aau.dk
Wed Jul 28 14:26:27 CEST 2010
How would it? As I wrote, I suggested that you should be able to disable
the function name result variable with a compiler directive. That
wouldn't break anything since normal code wouldn't have the compiler
directive
I know why the functionality is there, but I just think it's unnecessary
baggage and complexity in a modern dialect
The semantics are really hard to figure out too, whereas it makes
perfect sense when you use "result". I don't think it follows logically
whether it'll call the function or set the result
I attached a patch, that works as I suggested
I think alot of other people would think of this as an unnecessary
"addition", but well, I like my compilers strict :)
Hans-Peter Diettrich skrev:
> Jeppe Johansen schrieb:
>
>> I wouldn't miss not having the name of the function as a result
>> variable in mode objfpc, at all. I think it would be a valid
>> addition, as a compiler directive that was turned on as default, as
>> not to break existing code
>
> It would break the compiler itself.
>
> DoDi
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nofuncnameresult.patch
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20100728/ff1a8385/attachment.ksh>
More information about the fpc-devel
mailing list