On Fri, 2003-10-03 at 00:41, Charles Evans wrote:

> ...
> I have a build in which >, etc, return a variable. The overhead is negligible.
> I would favor making this behavior official 
> (unless you want syntax for this: 0 < ` !b `< 5 := 5  or  !x ` < 0 := 5 or ~).

That's nice, if it's cheap.  I guess the next question is identifying
which operations should have this feature - just the comparisons, or
more?

Is there any sane reason for having, say:

(5+x) := 3

[please say "no"]?  What about:

(x <:= y) := 2

?  (And what would the above mean?)

Another approach might be to have a meta-operator, such as:

    (0 .> x) := 3

to identify operations that are to produce their rhs before deferencing.

> > Even coexpressions can't help you here!  So, if *that* problem were
> > solvable, you'd have at least a reasonably compact solution: e.g.
> > 
> >     every (!L < 0, &lastGenValue) := &null
> > 
> > [to invent a (weird) keyword] that would be comparable to the
> > simple variable case and hence 'consistent'.  I think it would be
> > a nightmare to implement efficiently, however.  Perhaps it's just
> > better to hide the current ugliness in a procedure:
> 
> I hope someone can find a way. I don't know how to do that exactly, 
> but I think that getting the last value returned from a 
> coexpression would be very easy - just one more slot in the data structure.
> It is on my to-attempt list (when I get to the list :)
> (I hope someone will beat me to it - I need it often!)

Nice idea. I agree that it should be pretty easy - just need an
operation on a co-expression to reference that field.  How about
a field reference:

a := create !L

every (|@a < 0, a.last) := &null

> I would still want a reference data type (as in SNOBOL) (but I don't know how).

I've thought about this also, but keep going around on whether it's
'safe' or not.  It shouldn't be hard to provide, it's a new data type,
but you would really only need two explicit operations on it:  create
reference and dereference.  Where all the thought comes in is how
it is operated on implicitly (i.e. if x is a reference, what is
(x+5) [i.e. should this be an error (requiring an explicit dereference)
or an implicit dereference].  What about (x === y)?  where x has a
reference value and y does/doesn't?

-- 
Steve Wampler -- [EMAIL PROTECTED]
Quantum materiae materietur marmota monax si marmota
                    monax materiam possit materiari?


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to