> On Jun 20, 2019, at 3:58 PM, Michael Van Canneyt <mich...@freepascal.org> 
> wrote:
> 
> The point is that there is in my example only 'Values' which is a unique 
> name. Making that 'Default' just means that the 'Values' keyword can be left 
> out.
> making the 'Values' array the single default.

Got it. The default is “values”.

> I always felt it silly that I must do
> 
> MyStrings.Items[0]
> and
> MyStrings.Values['Name']
> 
> when the compiler could perfectly see what overload to use when I type
> 
> MyStrings.items[0] MyStrings.items['Name']
> And, by extension
> MyStrings[0] MyStrings['Name']
> 
> Still you must be careful, because what is meant by
> MyStrings['0'] ... is it a type error or is actually the name meant ?

It’s basically the same as any other overloaded method so I don’t see where the 
problem could be.

Regards,
        Ryan Joseph

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to