On 1-Aug-08, at 5:32 AM, Dennis Smith wrote: >> The advantage of "{ }" or (* *) is that the opening a comment is >> distinct from closing a comment. This allows the compiler to support >> nested comments without escaping. If you don't mind escaping nested >> comments, what reason do you have for preferring single-double-single >> as the escape sequence over double-double? >> > Compatibility with a large existing Smalltalk that already does it. Already does what? Escaping comments? I don't understand. The original complaint was that if you have code that looks like this: self doSomething. "This has no side effects" self doOtherThing "This does" and you want to comment it out, you have to double up the quotes because comments aren't nestable: " self doSomething. ""This has no side effects"" self doOtherThing ""This does"" " With nestable comments, you don't have to change the existing comments at all: "{ self doSomething. "This has no side effects" self doOtherThing "This does" }" If we adopted VA syntax, it would look like this: " self doSomething. '"'This has no side effects'"' self doOtherThing '"'This does'"' " Ok, that would be compatible with VA, but it doesn't seem to be an improvement over what we already have. Am I missing something? Or are you saying something along the lines of, "I'm not interested in nestable comments, but as long as we're talking about comment syntax, I propose we adopt the VA syntax to improve compatibility?" Colin _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
The VA syntax starts out just like ours
"this is a comment string" however, if you comment something that includes the above string, the " chars inside the comment become '"' and do not take part in comment handling so the comment is not part of a larger comment. e.g. "outside stuff '"'this is a comment string '"' more outside stuff" I see two advantages to this 1. it retains the current simple comment notation for normal comments 2. its compatible with VA Colin Putney wrote: On 1-Aug-08, at 5:32 AM, Dennis Smith wrote:The advantage of "{ }" or (* *) is that the opening a comment is distinct from closing a comment. This allows the compiler to support nested comments without escaping. If you don't mind escaping nested comments, what reason do you have for preferring single-double-single as the escape sequence over double-double?Compatibility with a large existing Smalltalk that already does it.Already does what? Escaping comments? I don't understand. The original complaint was that if you have code that looks like this: self doSomething. "This has no side effects" self doOtherThing "This does" and you want to comment it out, you have to double up the quotes because comments aren't nestable: " self doSomething. ""This has no side effects"" self doOtherThing ""This does"" " With nestable comments, you don't have to change the existing comments at all: "{ self doSomething. "This has no side effects" self doOtherThing "This does" }" If we adopted VA syntax, it would look like this: " self doSomething. '"'This has no side effects'"' self doOtherThing '"'This does'"' " Ok, that would be compatible with VA, but it doesn't seem to be an improvement over what we already have. Am I missing something? Or are you saying something along the lines of, "I'm not interested in nestable comments, but as long as we're talking about comment syntax, I propose we adopt the VA syntax to improve compatibility?" Colin _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc -- Dennis Smith +1 416.798.7948 Cherniak Software Development Corporation Fax: +1 416.798.0948 509-2001 Sheppard Avenue East [hidden email] Toronto, ON M2J 4Z8 <a class="moz-txt-link-freetext" href="sip:dennis@CherniakSoftware.com">sip:dennis@... Canada http://www.CherniakSoftware.com Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Terry Raymond
At 05:31 AM 7/29/2008, Terry Raymond wrote:
>Maybe it is just me but I would like to be able to comment >out a group of lines without having to double quote enclosed >quotes. +1. > I think it would be nice to have something like >/* and */ Yuck - for C, yeah ok, but they were forced into it - as no single character met the criteria, with tilde and grave accent the only ones free, IIRC, but neither was ubiquitous, given the keyboards of the day. They made do with /**/, as the least yucky thing available. C-like languages, having copied as much C syntax as they could, are incented to keep the ugly /**/ things with everything else. Not one iota of this applies to Smalltalk. Less than one, even, cuz we have composable thumbs, er, selectorThingys. Can pilt-down man say that? Nope. >and make them nestable. Nestable comments - yes - superior idea, and long overdue. But using a two character sequence makes nesting *harder*. Using *two* two character sequences, mirror-paired, is harder still. Counting lemma, and all that. And pointless, anyway. "Just make $"'d "comments" nestable." Easy Peasy. Not as easy as Brandt's solution. But nothing ever is. [ Er, you don't say. Mumble mumble. Hey - that actually works. [Doh!] Thanks John! ] Still, the "Going nestable" is the bit that impacts the surrounding system, so if someone's biting the bullet, might as well get it right. At worst, the cost is the same. "But I expect it would be *far* easier/cheaper to use "nestable" quiotes instead." Regards, -cstb _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Smalltalk already has a comment character,
".
Smalltalk already has a convention for
nesting: doubling the quote mark, e.g. apostrophes inside strings. This already
works for comments too.
VW already has a comment key, ESC
". Why not just make ESC " and ESC ' work on
their respective quote marks so that:
- if there is no selection, a pair of quote
marks are inserted and the cursor placed between them
- if the selection is preceded and followed
by a quote mark, uncomment it by removing those and replacing any pair
of quote marks with a single quote mark
- otherwise, comment the selection by
inserting a quote mark before and after it, and replace any contained
quote mark with a pair of quote marks
Make double-clicking inside the first quote
mark select the whole comment or string, not just up to the first doubled quote
mark.
Steve _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by jas
O.M.G.
Who wrote this ignorant bit of tripe? >Still, the "Going nestable" is >the bit that impacts the surrounding >system, so if someone's biting the >bullet, might as well get it right. >At worst, the cost is the same. >"But I expect it would be *far* >easier/cheaper to use "nestable" >quiotes instead." > > >Regards, > >-cstb You'd need a truly pathological model to get more than a handful of tests to pass. If you were going for sarcasm, it was poorly written. Just stfu and give a +1 to steven kelly, already. The kids these days. ;-) Cheers, -Jim _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Travis Griggs-3
I agree with Travis on the simplicity.
Since hilite/ESC/" will create or undo a comment, how about just making it smart enough to create & undo sub comments as well? This way we keep the simplicity, yet make it easy for the pragmatic cases mentioned. Arden [hidden email] -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Travis Griggs Sent: Friday, August 01, 2008 2:31 AM To: VWNC List Subject: Re: [vwnc] Lets have nestable comments (/* */) On Jul 31, 2008, at 5:58 PM, Colin Putney wrote: > I wrote: >>> I think "{ and }" was also a good suggestion. > On 30-Jul-08, at 7:38 PM, Dennis Smith wrote: > >> Why add complexity to the syntax when VA has already >> done it using " characters by quoting the internal ones in >> single quotes? No added syntax, a bit of semantic change, >> and some compatibility among vendors?? > > The advantage of "{ }" or (* *) is that the opening a comment is > distinct from closing a comment. This allows the compiler to support > nested comments without escaping. If you don't mind escaping nested > comments, what reason do you have for preferring single-double-single > as the escape sequence over double-double? I like the simplicity of comments currently. I just have to quote something. A very natural language type of thing to do. It's a single shift-char sequence. All of these suggestions, while they solve a problem I encounter now and then again, do so at the expense of ease of use for the very common documentation case. I have to do a two- shift-char sequence and differentiate between lead and end. -- Travis Griggs Objologist "An idea, like a ghost, must be spoken to a little before it will explain itself." - Charles Dickens _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.5.12/1594 - Release Date: 8/5/2008 9:49 PM _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Arden
That would be fine as long a double-click were also smart enough to select the "real" comment. Terry =========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 [hidden email] <http://www.craftedsmalltalk.com> =========================================================== > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On Behalf Of Arden Thomas > Sent: Friday, August 15, 2008 11:19 AM > To: 'VWNC List' > Subject: Re: [vwnc] Lets have nestable comments (/* */) > > I agree with Travis on the simplicity. > > Since hilite/ESC/" will create or undo a comment, how about just making it > smart enough to create & undo sub comments as well? > > This way we keep the simplicity, yet make it easy for the pragmatic cases > mentioned. > > Arden > [hidden email] > > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On Behalf > Of Travis Griggs > Sent: Friday, August 01, 2008 2:31 AM > To: VWNC List > Subject: Re: [vwnc] Lets have nestable comments (/* */) > > > On Jul 31, 2008, at 5:58 PM, Colin Putney wrote: > > > I wrote: > >>> I think "{ and }" was also a good suggestion. > > On 30-Jul-08, at 7:38 PM, Dennis Smith wrote: > > > >> Why add complexity to the syntax when VA has already > >> done it using " characters by quoting the internal ones in > >> single quotes? No added syntax, a bit of semantic change, > >> and some compatibility among vendors?? > > > > The advantage of "{ }" or (* *) is that the opening a comment is > > distinct from closing a comment. This allows the compiler to support > > nested comments without escaping. If you don't mind escaping nested > > comments, what reason do you have for preferring single-double-single > > as the escape sequence over double-double? > > > I like the simplicity of comments currently. I just have to quote > something. A very natural language type of thing to do. It's a single > shift-char sequence. All of these suggestions, while they solve a > problem I encounter now and then again, do so at the expense of ease > of use for the very common documentation case. I have to do a two- > shift-char sequence and differentiate between lead and end. > > -- > Travis Griggs > Objologist > "An idea, like a ghost, must be spoken to a little before it will > explain itself." - Charles Dickens > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > No virus found in this incoming message. > Checked by AVG - http://www.avg.com > Version: 8.0.138 / Virus Database: 270.5.12/1594 - Release Date: 8/5/2008 > 9:49 PM > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Terry Raymond
Yes, and the same for strings
in single quotes, as I wrote earlier:
Steve From: [hidden email] on behalf of Terry Raymond Sent: Fri 8/15/2008 18:44 To: 'Arden Thomas'; 'VWNC List' Subject: Re: [vwnc] Lets have nestable comments (/* */) Arden _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Terry Raymond
2008/7/29 Terry Raymond <[hidden email]>:
> Maybe it is just me but I would like to be able to comment > out a group of lines without having to double quote enclosed > quotes. I think it would be nice to have something like > /* and */ and make them nestable. If this or any of the alternatives is adopted, it would be good if it was adopted by all Smalltalk dialects :-) -- Make the most of your skills - with OpenSkills http://www.openskills.org/ _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Terry Raymond
Especially considering how much cross platform effort is happening right now in the seaside world with squeak, visualworks and gemstone all supporting a number of pieces. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi folks, Note that C-style /* ... */ are NOT the same as nestable comments (since a single */ closes all open /* comments). I used to use { ... } as nesting Smalltalk comments. My compiler hack is part of one of my old file-in libraries (STP9 or STP12, I think. If anyone really wants, it's just a few lines of code... stp -- Stephen Travis Pope -- Santa Barbara, California, USA http://HeavenEverywhere.com http://FASTLabInc.com On Aug 16, 2008, at 1:28 PM, Boris Popov wrote: > Especially considering how much cross platform effort is happening > right now in the seaside world with squeak, visualworks and gemstone > all supporting a number of pieces. > > Cheers! > > -Boris (via BlackBerry) > > ----- Original Message ----- > From: [hidden email] <[hidden email]> > To: VW NC <[hidden email]> > Sent: Sat Aug 16 11:31:49 2008 > Subject: Re: [vwnc] Lets have nestable comments (/* */) > > 2008/7/29 Terry Raymond <[hidden email]>: > > Maybe it is just me but I would like to be able to comment > > out a group of lines without having to double quote enclosed > > quotes. I think it would be nice to have something like > > /* and */ and make them nestable. > > If this or any of the alternatives is adopted, it would be good if it > was adopted by all Smalltalk dialects :-) > > -- > Make the most of your skills - with OpenSkills > http://www.openskills.org/ > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc pastedGraphic.tiff (3K) Download Attachment |
Free forum by Nabble | Edit this page |