From: <[EMAIL PROTECTED]> > Hello, REBOLers ! > > Just for a bit of "syntactic sugar" :-) : > Is it possible to define new infix operators ? > I tried : > > >> ||: make op! ... etc. > ** Script Error: Cannot use make on datatype! value > > It would be a very nice feature (á la Prolog, or C++) to define (or > "overload") some operators. > > Cheers: > Geza Lakner MD Interesting idea. In fact, I've been pondering the chicken and egg argument about REBOL in terms of whether the operators are natively prefix or infix. My guess is that they are defined as prefix, like most of REBOL, and then REBOL uses a dialect in essence in evaluating expressions as infix. It is "easy" to define new operators as prefix. For example: ||: :or || 1 2 ; yields 3 I know that this is not quite the syntactic sugar that you're looking for, but it demonstrates REBOL's flexibility, nonetheless. Maybe if it's not "top secret", or something, RT can put my mind to rest over whether the infix notation is just a type of dialect. I.m really curious about this one. --Scott Jones -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
