User defined operators

Gilles Lenfant glenfant at NOSPAM.bigfoot.com
Tue Feb 25 13:17:22 CET 2003


"Alex Martelli" <aleax at aleax.it> a écrit dans le message de news:
pCI6a.312962$AA2.11837273 at news2.tin.it...
> Turhan Ozen wrote:
>
> > Why it is not allowed to create a new operator but only modify the
> > existing ones?
>
> The few languages that allow users to define new operators typically
> need complicated infrastructure to allow precedence and associativity

Do you really think that Forth has a complicated infrastucture (some 10Kb
for the kernel) ?

> of user-defined operators to be defined -- and the resulting programs
> are often not any easier to read (to put it mildly) because of the
> extra helping of syntax sugar.  Python is simpler, and programs in
> Python easier to read, thanks to the surface-syntax being fixed, all
> operator precedence and associativity carved in stone, and so on.

Okay, Forth syntax is not for newbies :-)

--Gilles

>
>
> Alex
>






More information about the Python-list mailing list