From: Xiangyu Yang Date: 2004-07-16T13:02:16+09:00 Subject: Re: Do you want ":=" operator? Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Do you want ":=" operator?" > on 04/07/16, "Xiangyu Yang" writes: > > |I can't use << and other operators, for they are all meaningful in my > |CPU model and have precedence problem. And I can't force anybody to > |program "R0.assign(R0&R1)" for my CPU, otherwise I will be kicked to > |death. I have to translate "Rx=..." to "Rx.assign ...", then eval the > |latter. > > I don't think I'm going to add ":=" just for cosmetic purpose. But The cosmetic is one of the most important reasons I choise ruby. I also use ruby to prototype or verify algorithms. Sometimes it's very handy to run a pseudo-code in ruby, but sometimes hard (same reason of ":="). This additional syntax feature will ease my life very much. Anyway, it's personal opnion and relates strongly to the application field. Many peopel may never want to use the feature I argue for. > you can define "attribute assignment method" such as "x.foo=val". > Can you accept method call like "R.x=..." instead of "Rx := ..."? > > matz. No, I can't. Each Rx is a RegisterClass *object* in my CPU, which hold some states. When I code "R0=R0&R1", I only want to change 1 of the R0's attributs and don't touch others.