On 26.04.2006, at 02:07, Chris Becker wrote: > It's the Croquet 1.0.10 image. > wouldn't the croquet list then not be better for this question? Especially when writing a mail that assumes Croquet (without mentioning it), and even suggest that everyone of course has seen the error. Marcus |
In reply to this post by Chris Becker-2
Chris Becker a écrit :
> Hi all, > > I'm trying to load code that contains underscore assignment operators > using Monticello. It pops up a "syntax error" dialog for each method. > Since I have hundreds of methods it would be a nightmare to replace > them with ":=" manually. > > Anyone solve this problem yet? > > Thanks, > > Chris Becker > > > I've implemented a scanner subclass for that problem (attached). '_' are replaced with ':=' only when '_' is scanned as an assignment. Here an example that read test.st and write test2.st. | f | f := ( FileStream forceNewFileNamed: 'test2.st') . f nextPutAll: (PlatypusVW5PackageExporterScanner new outPut: ( FileStream fileNamed: 'test.st') contents). f close alain PlatypusVW5PackageExporterScanner.st.gz (1K) Download Attachment |
In reply to this post by Marcus Denker
Am 26.04.2006 um 07:23 schrieb Marcus Denker:
> On 26.04.2006, at 02:07, Chris Becker wrote: > >> It's the Croquet 1.0.10 image. >> > wouldn't the croquet list then not be better for this question? True, but a newcomer might not know that this is a problem particular to Croquet. > Especially when writing a mail that assumes Croquet (without > mentioning it), and even suggest that everyone of course has > seen the error. It would at least have been helpful, because someone could have answered immediately. Anyway - to allow assignment by underscore in a Croquet image, do this: Preferences enable: #allowUnderscoreAssignment I guess the preference was added to not accidentally re-introduce assignment arrows in the Croquet sources. - Bert - |
In reply to this post by Marcus Denker
There have been numerous posts on *this* list relating to changing
the functionality of underscores (backarrows) in Squeak. If the standard Squeak image no longer supports the legacy assignment operator, Monticello will have to be changed to convert them to ":=". This issue pertains to Squeak functionality, not Croquet functionality. Chris On Apr 26, 2006, at 1:23 AM, Marcus Denker wrote: > > On 26.04.2006, at 02:07, Chris Becker wrote: > >> It's the Croquet 1.0.10 image. >> > wouldn't the croquet list then not be better for this question? > Especially when writing a mail that assumes Croquet (without > mentioning it), and even suggest that everyone of course has > seen the error. > > Marcus > |
On 26.04.2006, at 15:31, Chris Becker wrote: > There have been numerous posts on *this* list relating to changing > the functionality of underscores (backarrows) in Squeak Not the funtionality, it was just about printing _ as _, not forbidding to compile _ assigments. > . If the standard Squeak image no longer supports the legacy > assignment operator, Yes, if it would no longer supports it. But it does... we did not even start thinking about removing this. Of course we should, and it's nice to see that Croquet just did it. Marcus |
Ah, so the "Underscore conversion in 3.9" thread doesn't refer to changes being incorporated into Squeak 3.9. OK, thank you for clearing that up for me Marcus.
Chris On Apr 26, 2006, at 10:14 AM, Marcus Denker wrote:
|
On 26.04.2006, at 16:58, Chris Becker wrote: > Ah, so the "Underscore conversion in 3.9" thread doesn't refer to > changes being incorporated into Squeak 3.9. OK, thank you for > clearing that up for me Marcus. Yes, it does. But there are multiple steps: 1) print _ as _ 2) now the code in the image looks bad --> needs to be converted to := Both are planned for 3.9a. (that is, 1) is done, 2) not yet completed). but then: 3) now that there is only := in the image, can we get rid of _ as an assigment character? This we have not yet discussed, and it is *not* planned for 3.9. And it needs some thought, because it brakes loading old code. So we would need tool support for that. Marcus |
I'm quite interested in the underscore topic but sometimes challenged to follow some of the discussions when the underscore character literally used in the discussion.
print _ as _ is actually not such a bad example because I was able to figure out what Marcus meant. But there were some really bad ones in prior discussions that ended up being completely ambiguous. Some might be reading in Squeak, for example, so you can't know what they're seeing, maybe: print <- as <- (note <- is a crude left arrow in this plain ascii email). When discussing underscore assignment, may we all make extra effort to be very clear; one suggestion would be to simply spell it out, "underscore" and "left-arrow".. Thanks.. ----- Original Message ---- From: Marcus Denker <[hidden email]> To: The general-purpose Squeak developers list <[hidden email]> Sent: Wednesday, April 26, 2006 10:24:13 AM Subject: Re: Loading code containing underscore assignments using Monticello On 26.04.2006, at 16:58, Chris Becker wrote: > Ah, so the "Underscore conversion in 3.9" thread doesn't refer to > changes being incorporated into Squeak 3.9. OK, thank you for > clearing that up for me Marcus. Yes, it does. But there are multiple steps: 1) print _ as _ 2) now the code in the image looks bad --> needs to be converted to := Both are planned for 3.9a. (that is, 1) is done, 2) not yet completed). but then: 3) now that there is only := in the image, can we get rid of _ as an assigment character? This we have not yet discussed, and it is *not* planned for 3.9. And it needs some thought, because it brakes loading old code. So we would need tool support for that. Marcus |
Free forum by Nabble | Edit this page |