Re: Syntax, expressiveness and the beauty of Tcl



slebetman@xxxxxxxxx wrote:

Can't your not be done with "proc = {..." also? This would work also with
+, -, * and so on. Some kind of operator-"overloading".

Aliases are faster since there is no "call"ing involved.

Okay, I was not aware of that.

In fact I used
to do it with proc before I found out about aliases.

Looks like there can be done many funny things with that.

Besides, making Tcl do "strange" things can be fun.

Right, and sometimes I really love playing around with that.

Here's my own early attempt to please you:

I will have a closer look into that, looks cool to me. Does your example
imply that the variable must exist before it can be used that way? This
would be very C-like, more that I expected... ;-)

Stephan

.



Relevant Pages

  • Re: Aliases in 10.4.11
    ... borealbushman wrote: ... conclude your problem can't be a result of the Mac OS. ... Okay. ... Are the aliases being moved to new locations on the same volume? ...
    (comp.sys.mac.misc)
  • What is the purpose of .bash_aliases ?
    ... Okay, I know it's to put all your aliases in one place ... but is there any other real reason to use it? ... I prefer having e.g. environment variables, aliases and functions ...
    (comp.unix.shell)
  • Re: Syntax, expressiveness and the beauty of Tcl
    ... Aliases are faster since there is no "call"ing involved. ... to do it with proc before I found out about aliases. ... var y = 10 ... proc recursiveTest { ...
    (comp.lang.tcl)