On Wed, Apr 19, 2006 at 04:46:47PM -0500, [EMAIL PROTECTED] wrote:
> yes.  there are a couple (okay, three) problems to address here.  byron and 
> paul haahr
> addressed some of the problems with a shell called "es" years ago, even 
> though they
> didn't have dynamic modules.
> 
> 1.  what interface do external modules get to see?  perhaps masquerading as
> a shell function would be good enough.

  I think Tcl has struck a nice balance here -- everything is a command
  taking a number of arguments. Or are you talking about a different
  sort of interface ?

> 2. what hooks are provided by the shell.  the "es" shell provided a hook 
> for darn near every language construct there was.  for example, it was 
> possible 
> to redefine globbing, piping, the if statement, etc.

  That is a bit too much, in my oppinion. I think what the 'core' shell
  is supposed to do is provide a nice glue for the rest of the dynamic
  functionality. Sort of like file system is a universal glue for every
  other application running on the system. I would say that this is the
  most challenging aspect of designing my dream 'shell' -- the glue is
  supposed to be easy enough for me to understand, yet powerful enough
  to express simple things in simple terms. Tcl comes pretty close
  to being that glue.

  Any other suggestions ?

> 3. shell syntax vs. command syntax.  the shell's syntax often gets in the way
> of command syntax.  

  I think this is unavoidable. But somehow, I don't really perceive it to
  be that big of a deal, anyway. Quoting is quite useful and not really
  painful. At least as long as you understand the rules involved. That's 
  why I like Tcl so much -- even though you have to use extra quote or eval
  from time to time, you know exactly how everything gets parsed because
  there's only 11 rules to describe the entire language machinery.

> mike hartel wrote up some stuff about this years ago.
> basically, it's a pain that the shell and, say, grep, want to use the same 
> characters.
> i can't just type
>       ; grep ^fn *.[ch]
> i must type
>       ; grep '^fn' *.[ch]
> instead.  this would get very difficult if one added awk-like functions to 
> the shell.
> es did this: anything passed to a function inside curly braces was passed 
> verbatim.
> thus "if" in es looks like a normal es function call:
>       ; if {condition1} {body1} {condition2} {body2}

   That sounds exactly like Tcl. 

Thanks,
Roman.

Reply via email to