[Top] [All Lists]

Re: Variables : list : scope : system : const

2003-05-10 11:17:20
On Saturday 10 May 2003 15:07, Kjetil Torgrim Homme wrote:
 > a string containing multiple list references will be split on
 > the references, and the list will contain the pre-, in- and
 > post-fixes as elements in the list.
 >   ["@{var} @{var}!"] => ["meep", " ", "meep", "!"]

On a gut level, I'd thought that
  [ "@{var} @{var}!" ] => [ "meep meep!" ].
And if var contains "foo" and "bar":
 [ "@{var} @{var}!" ]
    => [ "foo foo!", "foo bar!", "bar foo!", "bar bar!" ]
This is probably since brace expansion works like this in UNIX shells:
 $ echo {foo,bar}_{foo,bar}
 foo_foo foo_bar bar_foo bar_bar
and Sieve's header test, too:
 if address :all :is [ "To", "Cc" ]
                     [ "mutz(_at_)kde(_dot_)org", 
"mutz(_at_)mail(_dot_)kde(_dot_)org" ] {
  # To <->, To <->
  # Cc <->, Cc <->

  The effect of these expressions are now entirely nonobvious.

And not straightforward to define either, it seems.

  I might agree had the syntax for adding them been cleaner. But it
  isn't, so I don't.

I believe a cleaner syntax requires changes to the basic grammar of

That would introduce a catch22:
- You need the grammar to parse "require" commands
- You need to parse the "require" commands to find out the currently
  valid grammar.

At least in my implementation the grammar is hard-coded and any 
extension-dependent code kicks in after parsing into 
command/test/command-list/etc has taken place.

I expect others to do it likewise.


The [Sonny Bono Copyright Term Extension Act] expands copyright not
only for future, but also for existing works, even though their
authors obviously don't need any additional incentive to create them.
                -- "The Progress Of Science And Useful Arts":
                    Why Copyright Today Threatens Intellectual Freedom,
                   Free Expression Policy Project

Attachment: pgpVsnyZnbQ1m.pgp
Description: signature