[fpc-devel] Functors

Blaise at blaise.ru Blaise at blaise.ru
Mon Dec 27 02:19:09 CET 2021


On 27.12.2021 3:14, Martin Frb wrote:
> it enables you to skip writing the name of the method that is called?
> anything you can do with it, you can already do without it

I am truly flabbergasted at how this could possibly be unclear still. Michael have already asked exactly the same questions in the first reply to this thread. Allow me to quote my response:
On 26.12.2021 15:40, Blaise--- via fpc-devel wrote:
> On 26.12.2021 11:50, Michael Van Canneyt via fpc-devel wrote:
>> As I see it, it's just shorthand syntax to allow skipping the name 'Invoke'.
>> None of what is shown below cannot be handled by ordinary methods
> Well, yes.

> This is what irritates me, if this is a feature, it should enable me to do something that otherwise would have been at least some little bit more complex.

I shall go tell Default Array Property and Operator Add that, according to Martin Frb, they have been demoted from Features, because "anything he can do with you, he can already do without you" and because they need to be a "little bit more complex".

> default method

@Michael Van Canneyt: And I rest my case. /You/ never called them "default methods", but, merely based on the DEFAULT keyword and syntax similarity, users have already started calling them that -- exactly as I predicted. Then, they google "default methods" and they find "default methods in interfaces" for Java and C# -- a completely unrelated feature. Yes, the DEFAULT keyword is lying around, readily available, but is it worth the confusion of not just inventing a new term for a concept that already has an established name (cf. google "call operator overload"), but overloading the established term with an unrelated meaning?

-- 
βþ


More information about the fpc-devel mailing list