[E-Lang] Hydro & E operator expansions

Tyler Close tclose@oilspace.com
Wed, 21 Mar 2001 12:48:51 -0000


I (Tyler) wrote:
> I will also note that E 
> already has an
> asymmetric "+" operator with the String class "+".

Consider the following currently valid E code:

? def q := "abc"
# value: "abc"

? q += 'd'
# value: "abcd"

Then, using "+" for Hydro's "with":

? def q := [ 'a', 'b', 'c' ] toFIFO()
# value: [ 'a', 'b', 'c' ]

? q += 'd'
# value: [ 'a', 'b', 'c', 'd' ]

Speaks for itself I'd say.

Tyler