[stringtemplate-interest] ST# -
questionregardingspecialcasingofIList
Jeremy Gray
jgray at siberra.com
Thu May 25 18:21:22 PDT 2006
Re: "other issues e.g. with attributes of type Hashtable/IDictionary for
instance" - They too are special-cased, though at a higher level of
priority, so I'm not sure how that presents any more of an issue given
that they too already implement IList and it isn't a problem at the
moment.
Re: "Have you actually tried this with an ICollection?. And an IList." -
not as of yet, though I do recall reading a recent post on this mailing
list that stated that only item retrieval worked, not other properties.
If I've posted too quickly and in error from not having checked it
myself, I do apologize.
Re: "Template application is applicable to all attributes." - Yes, it
is, but has different semantics for those that are (at present) IList,
does it not?
I have to admit that unless I'm still missing something, the position on
using IList for multi-valued attributes instead of the most appropriate
interface, that being IEnumerable, is rather like hiding a pea (in that
anything that would count against IEnumerable already (and still would)
count against IList, except that targeting of IEnumerable would allow
multi-valued handling of objects that aren't IList)
By the way, at the end of the day I absolutely love ST#, so do bear in
mind that all this is just in the interest of curiosity and exploration.
:)
Jeremy
-----Original Message-----
From: stringtemplate-interest-bounces at antlr.org
[mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Kunle
Odutola
Sent: Thursday, May 25, 2006 6:25 PM
To: stringtemplate-interest at antlr.org
Subject: Re: [stringtemplate-interest] ST# -
questionregardingspecialcasingofIList
Jeremy,
> The short answer is yes. ST# could treat as multi-valued anything that
> implements IEnumerable.
True. I could have but, that creates other issues e.g. with attributes
of
type Hashtable/IDictionary for instance.
> With that in mind, for those objects that support more than
IEnumerable
> there is also nothing to stop ST# from allowing both of the following,
> the first of which I understand from a recent mailing list post is
> currently not possible:
>
> $list.Count$
Have you actually tried this with an ICollection?. And an IList.
> $list:template()$
Template application is applicable to all attributes.
Kunle
_______________________________________________
stringtemplate-interest mailing list
stringtemplate-interest at antlr.org
http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
More information about the stringtemplate-interest
mailing list