Re: unexpected semantics with using lists as default elements in tables
- From: espie@xxxxxxxxx (Marc Espie)
- Date: Tue, 22 Jun 2010 22:34:27 +0000 (UTC)
In article <1233e9c2-bca6-407d-804f-c64a199d6b41@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Jan <storkchen@xxxxxxxxx> wrote:
Anyone else ran into this one? Is this fixable without too much
trouble in the implementation? I'd be happy to hear your comments
about this.
Other languages, such as perl, as this little feature called
"auto-vivification" which does about what you'd like, namely, it creates
a new list that will be automatically used whenever necessary.
But then, you don't say you want a default list value, perl just makes
it so -> so this loses a bit of checking (perl has specific operators
for lists).
Considering that Icon has similar typed values (e.g., || vs. |||, the compiler
used to use this for type inference ), I believe that auto-empty lists
would work, with not too surprising results.
E.g., not give a default value, and have put magically work on those
values by creating new lists out of nowhere.
.
- Follow-Ups:
- References:
- Prev by Date: unexpected semantics with using lists as default elements in tables
- Next by Date: Re: unexpected semantics with using lists as default elements in tables
- Previous by thread: unexpected semantics with using lists as default elements in tables
- Next by thread: Re: unexpected semantics with using lists as default elements in tables
- Index(es):
Relevant Pages
|