On 1-Sep-07, at 4:02 AM, Eduardo Cavazos wrote: > So, we have a choice of read-only or read-write. Why did you make the > read-only variation at all and not have them all be read-write? My > guess is > that since read-only are slightly more effecient to access, you > provided a > choice; but I'm not sure so I'm asking. :-)
You can put a quotation in a read-only local and call it, and the code will still compile. > > I can see that the implementation would be a little simpler if only > read-write > were supported; i.e. there's special case code for ro and rw. Also, > the ! > syntax for rw would go away. Just wondering what you think about this > tradeoff; i.e. simpler implementation and semantics at the cost of > everything > getting boxed. I actually like it the way it is, but was just > curious about > your opinion on this. I could infer if a local is written to and make it read-write automatically. But I think marking read-write locals upfront is actually good for understanding code, because then you know that this closure has mutable state (which has consequences in how it can be used). Think of it like "const" or "final" in C++ and Java, respectively. Slava ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
