Re: Homogeneous sequence

new topic     » goto parent     » topic index » view thread      » older message » newer message

Derek Parnell wrote:

> CChris wrote:
> > > }}}
<eucode>
> > >   sequence of integer x
> > >   sequence of object x
> > >   sequence of sequence x
> > >   sequence of sequence of atom x
> > >   sequence of my_user_defined_type x
> > >   etc.
> > > </eucode>
{{{

> 
> 
> > Probably adding a shortcut notation like the one Bernie
> > suggested would be a good idea.
> 
> I would strenuously fight against that suggestion. I didn't comment on
> Bernie's
> original post because I thought that it was so obviously a mistaken idea that
> no one would support it.
> 
> If one must have a shortened syntax (and I can see why some might like that),
> then keep it in the 'Euphoria' style and avoid abbreviations etc...

I agree.

> As all of these are variations are sequences of some sort, and the common
> English
> term for a sequence is 'list', then maybe something along the lines of ...
> 
>   integer list x
>   object list x
>   sequence list x
>   atom list list x
>   my_user_defined_type list x
> 
> This form avoids the need for 'plural' English ("list of integers"),

In his suggestion above, Rob did not use the plural form. He wrote
"sequence of integer x". Or don't you like that because it's not
correct English grammar?

> avoids
> the preposition word "of", parses unambiguously, is extensible and you can
> even
> avoid making "list" a reserved word by employing a context-sensitive grammar.
> 
> By the way, notice that "object list" is identical to today's "sequence" so
> some
> purists might be tempted to remove 'sequence' as a keyword ... <just kidding>

What you proposed can also be done with the word "sequence", I think.
So it wouldn't be necessary to introduce a new keyword:

   integer sequence x
   object sequence x
   sequence sequence x
   atom sequence sequence x
   my_user_defined_type sequence x

However, I think for me personally Rob's suggestion is better readable.
And I consider readability much more important than "fast writability".

Regards,
   Juergen

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu