From: Chris Pine Date: 2003-03-22T00:12:16+09:00 Subject: Re: Proposal: new operator: '<-' (for assignments) ----- Original Message ----- foo = Foo.new("this value") ....later... foo <- "some new value" ---------------------------- This looks backwards to me. What I mean is, shouldn't the arrow point the other way? It seems closer to how hashes literals work, for example. The "variable" points to the "value". In any case, I don't think you can have left arrows like <- and <=: <= is taken (and isn't an arrow :) and <- might be used in code like 'a<-b' (is `a' less than negative `b'?). So how would you feel about -> ? Honestly, I'd be a little surprised if this got in to the language. Depending on your situation (you're trying to make a special-purpose language, right?) it might be better to write your own interpreter on top of Ruby, snarfing generously. For example, if you have a string of code like: foo << { doSomethingHere } you could just split the string on the first '<<' and eval the substrings. Depending on how robust you need your language to be (I'm assuming not very, since you were writing it for people who aren't really programmers, IIRC), this should be a relatively easy task, and perfect for Ruby. There's no reason the code used has to be readable by the actual Ruby interpreter, if you can write a couple-hundred line interpreter as a go-between. Just a thought, Chris