Re: A subst-antial question
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: A subst-antial question

From: Dan Smart <news900@dansmart.com>
Date: Sat Apr 29 2006 - 05:24:27 CEST

On 2006-04-28 09:01:16 -0400, John Seal <sealj@indy.raytheon.com> said:

> Dan Smart wrote:
>> I'm also going to take this opportunity to whine about how you can't
>> create a multi-statement list and eval it.
>
> You must mean something else.
>
> % set multiStatementList {
> > set foo(a) 1
> > set foo(b) 2
> > }
That isn't a list, it's a string, that happens (unlike many others) to
be convertable to a list.
>
> I *do* understand what you mean about [list] escaping semicolons. My
> solution has always been to build the script as a string and [append]
> the semicolons instead of [lappend] them. The [join $listOfLists ";"]
> solution also treats the script and the semicolons as strings.

And is hence broken, well the not actually working bit is the real
kicker, but if it did, the conversion to string would be pretty
annoying.

And it matters because unless you can treat scripts as lists, safely
operating on them is very (very) difficult.

Dan
Received on Sun Apr 30 03:31:07 2006