flaig at sanctacaris.net wrote: > Actually I was thinking of something related the other day: > Wouldn't it be nice to be able to define/overload not only > operators but also control structures? That triggered off something in my mind that's somewhat different from what you went on to talk about. So far we've been talking about ways of defining new syntax. But operator overloading isn't creating new syntax, it's giving a new meaning to existing syntax. So the statement equivalent of that would be defining new meanings for *existing* control structures! For example, when you write while expr: ... it gets turned into expr.__while__(thunk) etc. No, I'm not really serious about this -- it was just a wild thought! -- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg.ewing at canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4