Re: vote on assignments as expressions
"Mark Hahn" <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
Mark Hahn wrote: > #2) If I must have this feature, then I prefer the following syntax > (look at these in your text editor): > > a) a <- b > > b) a <! b > > c) a <: b > > d) a <~ b > > e) a := b > > f) a gets b > > g) <other> Laurent, in the middle of some late-night ramblings <grin>, correctly pointed out that "a <- b" has the problem than anyone typing "a < -b" without spaces will inadvertently get "a<-b". This is a real problem. So I would say we should rule out a) and d) for this reason. These two are the only two that looked like arrows of course. :-) I cast one vote for using this feature and one vote for e). I feel "a := b" is well-known from Pascal and looks like a real assignment statement without being in danger of being confused with "a == b" (at least not in my text editor). BTW: I Just realized there is no clean way to stop someone from using "a := b" on a line by itself since an expression is allowed on a line by itself. We will strongly suggest they not do this. This is actually an argument to use choice e ( ":=" ), since it looks the most like a normal assignment and will cause the least readability problem if they do this.