[fpc-pascal] Free Pascal 2.4.0 released

Marco van de Voort marcov at stack.nl
Sun Jan 3 12:38:05 CET 2010


In our previous episode, Michael Van Canneyt said:
> > I still don't get what's the real use of such constructs? I see only
> > that it seems to encourage a hacky scripting language like coding style?
> 
> Or like Javascript. That one gives me a headache when just looking at it :(
> 
> I don't understand what is so bad about having to name a function ? 
> OK, in C or languages where you have only 1 namespace this may require
> some thinking.
> 
> But pascal has 'local' functions, so they don't pollute your namespace.
> If coded in an object, it's just a private method if you want.
> And if not that, you can code it in the implementation part of 
> your unit. Plenty of possibilities, and you always have readable code.

That only worked hackingly, since procvars are for globals only. So you must
check yourself that they are local, and TV/Objects then calls them with some
hackery. And you can never pass local and global procs to the same procvar.

Though I don't like the anonymous in-line declaration any more than you do
probably, and if D2009 hadn't come along I would have been more in favour of
fixing this the ISO pascal way.



More information about the fpc-pascal mailing list