Re: syntax for dict
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: syntax for dict

From: Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at>
Date: Mon Mar 20 2006 - 17:21:37 CET

Donal K. Fellows <donal.k.fellows@manchester.ac.uk> wrote:
> Salvatore Sanfilippo wrote:
>> there are chances that I'll get in the near future more free time again
>> to continue the Jim project, in the meantime I'm using Tcl for a lot
>> of important projects, and one of the more every-day limitation of Tcl
>> is in my experience the lack of syntax for [dict].

One problem of adding syntax for dict is that this would
mean combining the name of the dictvar and the key into
one string (that is then the 1st argument to e.g. "set").
This means, that any Objects used as keys for dicts not
only get a string-rep added, but completely lose their
object-representation.

Also, any kind of special char ( e.g. '|', '->', ',' in the
other subthread) restricts the set of valid characters a key
can consist of.

> What I think ought to happen (within Tcl that is) is that there ought to
> be a way of using the [array] command to tell an array that it's back
> end is to be something other than the hash-of-variables that we're
> currently forced to use.

How much of the current "env"-magic could be reused/adapted for such
a feature ?
Received on Sun Apr 30 02:41:54 2006