June 26, 2002 Re: semicolons | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | "Sean L. Palmer" <seanpalmer@earthlink.net> wrote in message news:aef61u$2j1f$1@digitaldaemon.com... > I usually put braces there in any case because they're more visible than a semicolon. > > Sean > Yes, or place the semicolon on a line by itself: for(int n; n<Max && !isFound(n); n++) ; But I think this is best: for(int n; n<Max && !isFound(n); n++) { } for(int n; n<Max && !isFound(n); n++); This sucks, it is too easy to miss the semicolon here! -- Stijn OddesE_XYZ@hotmail.com http://OddesE.cjb.net _________________________________________________ Remove _XYZ from my address when replying by mail |
June 27, 2002 Re: semicolons | ||||
---|---|---|---|---|
| ||||
Posted in reply to OddesE | I actually prefer for(blah; blah; blah) {} which is distinguished from all other fors (ie. any that are not specifically intended to contain no statements) denoted as for(blah; blah; blah) { ... } by the use of {}. This {} denotes a conscious decision to "contain nothing" Either way, the use of braces is far more visible than a semicolon "OddesE" <OddesE_XYZ@hotmail.com> wrote in message news:afd5sf$29ka$1@digitaldaemon.com... > "Sean L. Palmer" <seanpalmer@earthlink.net> wrote in message news:aef61u$2j1f$1@digitaldaemon.com... > > I usually put braces there in any case because they're more visible than a > > semicolon. > > > > Sean > > > > > Yes, or place the semicolon on a line by itself: > > for(int n; n<Max && !isFound(n); n++) > ; > > > But I think this is best: > > for(int n; n<Max && !isFound(n); n++) > { > } > > > > for(int n; n<Max && !isFound(n); n++); > > This sucks, it is too easy to miss the semicolon here! > > > -- > Stijn > OddesE_XYZ@hotmail.com > http://OddesE.cjb.net > _________________________________________________ > Remove _XYZ from my address when replying by mail > > > |
June 27, 2002 Re: semicolons | ||||
---|---|---|---|---|
| ||||
Posted in reply to OddesE | I've read it previously. It's like the guy read my mind!! Sean "OddesE" <OddesE_XYZ@hotmail.com> wrote in message news:afd5jl$29dg$1@digitaldaemon.com... > "Sean L. Palmer" <seanpalmer@earthlink.net> wrote in message news:ae6ql5$1c6h$1@digitaldaemon.com... > > I'm not taking anything as flame (that's just how I react occasionally. > ;) > > I didn't mean my post as reactionary or flame either; sorry if you took > it > > that way. > > > > Oh well I can live with semicolons. Not a big deal. It's better than having to surround every statement with parenthesis or braces. > > > > I just wish the IDE/Editor performed more of these functions. The text-based nature of programming languages is getting me down lately. A smart IDE can detect errors as you type, and could auto-indent, as well > as, > > say, draw barely-visible boxes around each statement or whatever. > > > > You could program in a sort of boxes, plugs, and sockets view; a kind of data flow graph. Maybe toggle back and forth between that and text view. > > Or to a class hierarchy view. The raw text view is so restrictive and antiquated in comparison. One could make a programming language that > didn't > > use text at all if you tried. > > > > What's really important in a language (to me) is the conceptual relationships between its elements. What gets what to do what with what. > > > > Sean > > > > > Sean, check out this article called > SCID - Source Code In Database: > http://mindprod.com/scid.html > I found it to be a very iluminating > article, with some great ideas! > It talks about a lot of the things > you mention in your post. > > Incidentally, we have already been > talking on this group on something that > comes close to this, DML, a format > to store D source code in XML. The idea > is that you store only the pure code > and leave petty details like indentation > to be handled by the editor and an > XSLT stylesheet with some preferences. > DML never came further than pipe-dream > status though... :( > > > -- > Stijn > OddesE_XYZ@hotmail.com > http://OddesE.cjb.net > _________________________________________________ > Remove _XYZ from my address when replying by mail > > > |
June 28, 2002 Re: semicolons | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | On Sat, 15 Jun 2002 03:58:04 -0700, "Sean L. Palmer" <seanpalmer@earthlink.net> wrote:
> I usually put braces there in any case because they're more visible than a semicolon.
>
Semicolons (and other punctuation) is much easier to see with the appropriate font. I use a font that enhances these characters and it does change what I consider readable!
|
June 28, 2002 Re: semicolons | ||||
---|---|---|---|---|
| ||||
Posted in reply to Karl Bochert | I agree that a different color or font will help (somewhat!) but the main problem is that the brain selectively filters out the ubiquitous semicolon (because it's *everywhere*) so you plain don't perceive it even though your eyes can easily see it. The opposite is even more true, the lack of a semicolon just doesn't "jump out" at you. Automatic IDE indentation would solve most of this. But IDE's are not part of a core language spec. ;( Sean "Karl Bochert" <kbochert@ix.netcom.com> wrote in message news:1103_1025228880@bose... > On Sat, 15 Jun 2002 03:58:04 -0700, "Sean L. Palmer" <seanpalmer@earthlink.net> wrote: > > I usually put braces there in any case because they're more visible than a > > semicolon. > > > Semicolons (and other punctuation) is much easier to see with the appropriate font. I use > a font that enhances these characters and it does change what I consider readable! |
June 28, 2002 Re: semicolons | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | I tend to agree with you. I only didn't like taking out those repetitive ugly semicolon because it caused problems in C/C++, but D seems to have fixed most of those things. On the other hand there are cases where you need to use full stops, otherwise things get confusing. "Sean L. Palmer" <seanpalmer@earthlink.net> wrote in message news:afgp92$hkq$1@digitaldaemon.com... > I agree that a different color or font will help (somewhat!) but the main problem is that the brain selectively filters out the ubiquitous semicolon (because it's *everywhere*) so you plain don't perceive it even though your > eyes can easily see it. The opposite is even more true, the lack of a semicolon just doesn't "jump out" at you. > > Automatic IDE indentation would solve most of this. But IDE's are not part > of a core language spec. ;( > > Sean > > "Karl Bochert" <kbochert@ix.netcom.com> wrote in message news:1103_1025228880@bose... > > On Sat, 15 Jun 2002 03:58:04 -0700, "Sean L. Palmer" > <seanpalmer@earthlink.net> wrote: > > > I usually put braces there in any case because they're more visible than > a > > > semicolon. > > > > > Semicolons (and other punctuation) is much easier to see with the > appropriate font. I use > > a font that enhances these characters and it does change what I consider > readable! > > > |
Copyright © 1999-2021 by the D Language Foundation