> On Jun 20, 2019, at 2:17 PM, Michael Van Canneyt <mich...@freepascal.org> 
> wrote:
> 
> IMHO this goes contrary to what the word 'default' means. There can be only
> 1 default.

I think the name of “default” was probably a mistake and it should have been 
“nameless” or something similar. Not sure why it was chosen but it’s going to 
be giving us problems.

> 
> That said, allowing overloading of array properties based on index type has 
> been on my wish list since a long time.
> 
> So
>  property Values[index: integer]: TValue read GetValue;
>  property Values[index: string]: TValue read GetValue; would be a nice 
> addition.
> 
> Since the Values array is then uniquely named, 'Default' makes sense again.

The values array is uniquely named? Looks the same to me. Properties don’t 
support duplicate identifiers though and the real issue is being able to do 
c[0] or c[‘key’] without the property name. It feels to me like we’re being 
held back by the choice of the word default. How can we get around that? Seems 
like a silly thing to be getting in our way.

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