Mariano, As much as I don't like to adopt the position, all too common in other forums, that "you can't do that because I think it's ugly," I am forced to agree with Lucas. It's not that I care whether or not *you* have underscore assignments at your disposal, but having both really would be a broken mess.
Is it simply that you want to type _ and get :=? YEARS ago, I offered a near optimal solution to the problem. Never did I hear anyone say they wanted _ in their sources; they wanted to see a back-arrow, and they especially didn't want type the extra character. So, the fix is obvious: an *optional* editor feature that hijacks a key (probably _), inserts :=, and when the option is set, deleting = takes with it any preceding :. Then one has "underscore assignment" with the reduced typing and the compiler and sources are never burdened with the ambiguities that can arise, and the hijacking of _ is optional for those who do not want it. If you want to simultaneously load code with and w/o underscore assignment, I agree with Lucas that you really need to fix the legacy code, maybe in a separate image(??) and then load the fixed code. Am I missing something? I'm trying to be helpful and honest at the same time. Bill ________________________________________ From: [email protected] [[email protected]] on behalf of Lukas Renggli [[email protected]] Sent: Sunday, October 30, 2011 2:16 PM To: [email protected] Cc: Benjamin Van Ryseghem Subject: Re: [Pharo-project] Still more problems with underscore > Hi guys. I still have problems with underscore in Pharo 1.3. I want to use > underscore in both ways: in selectors and as assigment. Who would tell the system what you mean? > If I do: Scanner allowUnderscoreAsAssignment: true. > then it works in selectrs but not in assigment. > > If I do String allowUnderscore. > then it works for assigment but stops working for selector. This is the point of the design. Maybe the prefix "allow" is not quite revealing enough, because you cannot have both. You load the old code with the setting set to true. You fix your broken assignments and you switch to false to use underscores. Squeak has decided to go another way and allow both cases kind of simultaneous. What a broken mess! Lukas -- Lukas Renggli www.lukas-renggli.ch
