[fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

leledumbo leledumbo_cool at yahoo.co.id
Fri Oct 21 17:41:16 CEST 2011


> Maybe anonymous methods were introduced 
in other languages because they didn't have something like OP's 
procedure variables

IMO, it's because they're lazy to declare things before they use it. Often,
an anonymous function which first used just once eventually used more than
once. When that happens, users of languages with anonymous function would
refactor the function by removing it from the anonymous context into a
standalone named function, and re-pass it. Where as for Pascal style users,
that's not needed because the function is already named and standalone.

--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Delphi-s-anonymous-functions-in-Free-Pascal-tp4911527p4925137.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.



More information about the fpc-pascal mailing list