D - semicolons
- Sean L. Palmer (43/43) Jun 09 2002 I would like to humbly ask that semicolons not be mandatory statement
- Walter (10/14) Jun 09 2002 is
- Robert W. Cunningham (8/22) Jun 09 2002 Agreed.
- Walter (15/19) Jun 09 2002 lethargy),
- Sean L. Palmer (12/31) Jun 10 2002 If the compiler is smart enough to figure out there *should* be a semico...
- andy (3/61) Jun 10 2002 I like the semicolons, I think they're pretty.
- Walter (5/7) Jun 10 2002 semicolon
- Russ Lewis (17/24) Jun 11 2002 Right, if you drop semicolons, then the following code is legal
- Sean L. Palmer (15/26) Jun 11 2002 Someone *could* write this:
- Russ Lewis (18/24) Jun 11 2002 Sounds like my previous post sounded like a flame. I'm sorry - I certai...
- Sean L. Palmer (27/49) Jun 11 2002 I'm not taking anything as flame (that's just how I react occasionally. ...
- Karl Bochert (5/10) Jun 12 2002 The editor I use, Epsilon, does automatic indenting, and I find it inva...
- Andrew (23/23) Jun 12 2002 Epsilon comes with the source code, so it could be extended to support D...
- Karl Bochert (6/10) Jun 12 2002 Is the only difference between C and D (rom the editor's point of view!)...
- Pavel Minayev (4/7) Jun 13 2002 indenting,
- Andrew (6/6) Jun 12 2002 Evaluation version of Epsilon for:
- Walter (7/12) Jun 13 2002 invaluable.
- andy (2/23) Jun 14 2002 I like the semicolons.. they're pretty.
- Pavel Minayev (3/5) Jun 12 2002 Heh! =)
- Russ Lewis (22/35) Jun 12 2002 Or whitespace, like some languages. :) Heck, in Korn shell (I think bas...
- Sean L. Palmer (13/19) Jun 12 2002 your
- Russ Lewis (12/31) Jun 12 2002 My original vision was OLE-esque. But the hyperlink idea works, too. Y...
- anderson (19/73) Jun 12 2002 PCgrasp draws boxes and things around code as you type. I always turn it...
- Andrew (111/111) Jun 12 2002 I think Epsilon could be a good place to start! Were I capable, I would
- anderson (20/131) Jun 12 2002 Apone looking at Epsilon It seems little more then a text editor with te...
- OddesE (29/46) Jun 26 2002 ;)
- Sean L. Palmer (5/57) Jun 27 2002 I've read it previously. It's like the guy read my mind!!
- anderson (29/72) Jun 14 2002 Racking my brain to think of a simple case:
- Pavel Minayev (5/7) Jun 14 2002 The compiler won't allow you to do this, anyhow. You need
- anderson (3/11) Jun 15 2002 There I go again, putting my foot in my mouth.
- Sean L. Palmer (5/21) Jun 15 2002 I usually put braces there in any case because they're more visible than...
- OddesE (17/20) Jun 26 2002 Yes, or place the semicolon on a line by itself:
- Matthew Wilson (14/36) Jun 26 2002 I actually prefer
- Karl Bochert (3/6) Jun 27 2002 Semicolons (and other punctuation) is much easier to see with the approp...
- Sean L. Palmer (14/20) Jun 27 2002 I agree that a different color or font will help (somewhat!) but the mai...
- anderson (9/29) Jun 27 2002 I tend to agree with you. I only didn't like taking out those repetitive
I would like to humbly ask that semicolons not be mandatory statement separators in D, but that they be equivalent to newline, and that newline is a potential statement separator, semicolon is a definite one, and semicolon + newline is treated as only one separation. if (ihadacoollanguage) { int a = b + c int k = b + c + d + e // these don't count because they don't parse in the same places comma and semicolon do. int j = b + c + d + e // it actually has to be looking for a comma or semicolon for a newline to work instead // or it at least needs the remaining fragment to not to compile without treating the eoline as a terminator char[] thisstillworkshowever(char[]a, // comma is ok, it's just not necessary char[]b // comma optional because there's a newline instead char[]c; // semi optional where comma is accepted? char[]d); } I mean, I would like my compiler to not pick nits about semicolons. If I forget one, so friggin what it usually doesn't matter... the compiler has figured it out that it indeed was a missing semicolon big friggin deal, just deal with it and move on. It should be a warning at best. In order for the compiler to figure out that a semicolon is missing, it is known that a semicolon must be inserted to fix the problem, but since that's a legal fix it should just do it. It's like real english, sometimes you Dot all you're P"s and q's and someTimes you don't, and yes the code would be nicer if you did all your grammar homework or weren't lazy it's not crucial to get the point across. Allowing slop in syntax allows one to do quick "phrasing" while blocking out the code and clean up the subtle issues later. (if this ever becomes an issue because maybe the program works perfectly as written) Sometimes you just wanna test something quickly and do some cut'n'paste and the last thing you want to see is some stupid "you forgot a semicolon" problems. Yes I realize it would maybe create a few bugs; about as many as for(;;); has. Number of bugs created by a construct is proportional to the number of times that construct is used by someone. Useful constructs will inherently generate more bugs up to a point. Sean
Jun 09 2002
"Sean L. Palmer" <seanpalmer earthlink.net> wrote in message news:advgr5$2seb$1 digitaldaemon.com...I would like to humbly ask that semicolons not be mandatory statement separators in D, but that they be equivalent to newline, and that newlineisa potential statement separator, semicolon is a definite one, andsemicolon+ newline is treated as only one separation.It is a good idea, and it is implemented in Javascript. Unfortunately, it turns out to be problematic in practice. It's hard to write a grammar that accurately represents the behavior, and it can lead to troublesome error messages, etc. I worry about putting it in, and it making enhancements to the language impractical (like >> makes template argument lists a problem in C++).
Jun 09 2002
Walter wrote:"Sean L. Palmer" <seanpalmer earthlink.net> wrote in message news:advgr5$2seb$1 digitaldaemon.com...Agreed. I can't come up with a good example at the moment (Sunday afternoon lethargy), but I'm certain the use of CR or LF or CRLF or LFCR or whatever as a valid statement separator would lead to problems with quoting, and would lead to a proliferation of backslashes in code and/or string constants/literals. Or not. I'll think about it some more when my brain turns back on tomorrow... -BobCI would like to humbly ask that semicolons not be mandatory statement separators in D, but that they be equivalent to newline, and that newlineisa potential statement separator, semicolon is a definite one, andsemicolon+ newline is treated as only one separation.It is a good idea, and it is implemented in Javascript. Unfortunately, it turns out to be problematic in practice. It's hard to write a grammar that accurately represents the behavior, and it can lead to troublesome error messages, etc. I worry about putting it in, and it making enhancements to the language impractical (like >> makes template argument lists a problem in C++).
Jun 09 2002
"Robert W. Cunningham" <rcunning acm.org> wrote in message news:3D03F538.B8911A2D acm.org...I can't come up with a good example at the moment (Sunday afternoonlethargy),but I'm certain the use of CR or LF or CRLF or LFCR or whatever as a valid statement separator would lead to problems with quoting, and would lead toaproliferation of backslashes in code and/or string constants/literals.If you have a long expression broken up across multiple lines, with the automatic ; insertion, it can produce unexpected results. The grammar being difficult to specify also makes it hard to explain, so less experienced programmers will be likely to have trouble with it. C's simple rule, put a ; at the end of each statement, is easy to get right. Sure it's redundant, but error detection and diagnosis is *entirely* dependent on redundancy in the grammar. The right amount of redundancy is not too onerous, and makes error detection and accurate error messages possible for common mistakes. There are other examples of redundancy in D: the () in an if statement. The closing ) of a parenthesized expression. The comma between function parameters. It goes on and on...
Jun 09 2002
If the compiler is smart enough to figure out there *should* be a semicolon here, why not automatically insert one? Sean "Walter" <walter digitalmars.com> wrote in message news:ae14em$1cvl$1 digitaldaemon.com..."Robert W. Cunningham" <rcunning acm.org> wrote in message news:3D03F538.B8911A2D acm.org...validI can't come up with a good example at the moment (Sunday afternoonlethargy),but I'm certain the use of CR or LF or CRLF or LFCR or whatever as atostatement separator would lead to problems with quoting, and would leadabeingproliferation of backslashes in code and/or string constants/literals.If you have a long expression broken up across multiple lines, with the automatic ; insertion, it can produce unexpected results. The grammardifficult to specify also makes it hard to explain, so less experienced programmers will be likely to have trouble with it. C's simple rule, put a;at the end of each statement, is easy to get right. Sure it's redundant,buterror detection and diagnosis is *entirely* dependent on redundancy in the grammar. The right amount of redundancy is not too onerous, and makeserrordetection and accurate error messages possible for common mistakes. There are other examples of redundancy in D: the () in an if statement.Theclosing ) of a parenthesized expression. The comma between function parameters. It goes on and on...
Jun 10 2002
I like the semicolons, I think they're pretty. -Andy Sean L. Palmer wrote:If the compiler is smart enough to figure out there *should* be a semicolon here, why not automatically insert one? Sean "Walter" <walter digitalmars.com> wrote in message news:ae14em$1cvl$1 digitaldaemon.com..."Robert W. Cunningham" <rcunning acm.org> wrote in message news:3D03F538.B8911A2D acm.org...validI can't come up with a good example at the moment (Sunday afternoonlethargy),but I'm certain the use of CR or LF or CRLF or LFCR or whatever as atostatement separator would lead to problems with quoting, and would leadabeingproliferation of backslashes in code and/or string constants/literals.If you have a long expression broken up across multiple lines, with the automatic ; insertion, it can produce unexpected results. The grammardifficult to specify also makes it hard to explain, so less experienced programmers will be likely to have trouble with it. C's simple rule, put a;at the end of each statement, is easy to get right. Sure it's redundant,buterror detection and diagnosis is *entirely* dependent on redundancy in the grammar. The right amount of redundancy is not too onerous, and makeserrordetection and accurate error messages possible for common mistakes. There are other examples of redundancy in D: the () in an if statement.Theclosing ) of a parenthesized expression. The comma between function parameters. It goes on and on...
Jun 10 2002
"Sean L. Palmer" <seanpalmer earthlink.net> wrote in message news:ae2rju$9f4$1 digitaldaemon.com...If the compiler is smart enough to figure out there *should* be asemicolonhere, why not automatically insert one?Because although that's what the error messages says, it's actually just a guess that that is what the programmer most likely intended.
Jun 10 2002
Right, if you drop semicolons, then the following code is legal int a,b; int c = b+ a = a+b The compiler would interpret it as: int a,b; int c = b + ( a = a + b); But probably the programmer actually just made a typo, and meant int a,b; int c = b++; a = a + b; Walter wrote:"Sean L. Palmer" <seanpalmer earthlink.net> wrote in message news:ae2rju$9f4$1 digitaldaemon.com...-- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]If the compiler is smart enough to figure out there *should* be asemicolonhere, why not automatically insert one?Because although that's what the error messages says, it's actually just a guess that that is what the programmer most likely intended.
Jun 11 2002
Someone *could* write this: int a;b, int c = b+; a = a ++ b; Now what the hell does *that* do? And how is that any more or less likely than forgetting a semicolon? Did the programmer forget a +? Did the programmer really mean the ++? Or did he mean binary and unary plus? Is the ++ postfix increment of a or prefix increment of b? There's any number of ways to write code wrong; many of those are actually legal and compilable. I personally don't see much benefit from mandating semicolons. Sean "Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3D0628E5.B02592D4 deming-os.org...Right, if you drop semicolons, then the following code is legal int a,b; int c = b+ a = a+b The compiler would interpret it as: int a,b; int c = b + ( a = a + b); But probably the programmer actually just made a typo, and meant int a,b; int c = b++; a = a + b;
Jun 11 2002
"Sean L. Palmer" wrote:Someone *could* write this: int a;b, int c = b+; a = a ++ b; Now what the hell does *that* do? And how is that any more or less likely than forgetting a semicolon?Sounds like my previous post sounded like a flame. I'm sorry - I certainly didn't mean it that way. What I was trying to illustrate was that a simple typo resulted in legal - but unintended code. I thought that the example was useful because at first I was going to agree with you. However, when the counterexample crossed my mind, I changed my opinion. For that reason, I thought that it was a good way to illustrate my (changed) opinion. My argument is just a variant of Walter's old argument: "If any binary stream of data is a valid code, then there are no syntax errors. Syntax errors give you a simple sanity check to catch (some of the) invalid code." I think that semicolons do remarkably well in that role. Again, sorry for any flamish posts... -- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]
Jun 11 2002
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 "Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3D065180.651B3109 deming-os.org..."Sean L. Palmer" wrote:likelySomeone *could* write this: int a;b, int c = b+; a = a ++ b; Now what the hell does *that* do? And how is that any more or lesscertainlythan forgetting a semicolon?Sounds like my previous post sounded like a flame. I'm sorry - Ididn't mean it that way. What I was trying to illustrate was that a simple typo resulted in legal -butunintended code. I thought that the example was useful because at first Iwasgoing to agree with you. However, when the counterexample crossed mymind, Ichanged my opinion. For that reason, I thought that it was a good way to illustrate my (changed) opinion. My argument is just a variant of Walter's old argument: "If any binarystreamof data is a valid code, then there are no syntax errors. Syntax errorsgiveyou a simple sanity check to catch (some of the) invalid code." I thinkthatsemicolons do remarkably well in that role. Again, sorry for any flamish posts...
Jun 11 2002
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.The editor I use, Epsilon, does automatic indenting, and I find it invaluable. Many errors are caught when the editor indents strangely due to a missing semicolon, dangling else etc. It seems to me that I have seen an editor that marks the extent of blocks in the left margin. You're right though -- much more could be done.
Jun 12 2002
Epsilon comes with the source code, so it could be extended to support D. Though I'm not capable of doing such a thing! I'm sure someone in this newsgroup is! "Karl Bochert" <kbochert ix.netcom.com> wrote in message news:1103_1023868581 bose... | > | > 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. | | The editor I use, Epsilon, does automatic indenting, and I find it invaluable. | Many errors are caught when the editor indents strangely due to a missing | semicolon, dangling else etc. It seems to me that I have seen an editor that | marks the extent of blocks in the left margin. You're right though -- much | more could be done. | |
Jun 12 2002
On Wed, 12 Jun 2002 09:03:36 -0400, "Andrew" <crxace13 comcast.net> wrote:Epsilon comes with the source code, so it could be extended to support D. Though I'm not capable of doing such a thing! I'm sure someone in this newsgroup is!Is the only difference between C and D (rom the editor's point of view!) a different list of keywords to be colored? The hard part is automatic indenting, and comments. Aren't C and D just abot the same there? The first step would be to see where the C module comes up short when doing D files.
Jun 12 2002
"Karl Bochert" <kbochert ix.netcom.com> wrote in message news:1103_1023942917 bose...Is the only difference between C and D (rom the editor's point of view!) a different list of keywords to be colored? The hard part is automaticindenting,and comments. Aren't C and D just abot the same there?Yes, only D also have /+ +/ comments in addition to /* */
Jun 13 2002
Evaluation version of Epsilon for: WinDoze: http://www.lugaru.com/cgi-bin/send/eval/e11eval.exe Linux: http://www.lugaru.com/cgi-bin/send/eval/epsilon11eval.tar.gz FreeBSD http://www.lugaru.com/cgi-bin/send/eval/epsilon11eval-bsd.tar.gz OS/2 http://www.lugaru.com/cgi-bin/send/eval/e11os2.zip
Jun 12 2002
"Karl Bochert" <kbochert ix.netcom.com> wrote in message news:1103_1023868581 bose...The editor I use, Epsilon, does automatic indenting, and I find itinvaluable.Many errors are caught when the editor indents strangely due to a missing semicolon, dangling else etc. It seems to me that I have seen an editorthatmarks the extent of blocks in the left margin. You're right though -- much more could be done.The kinds of errors I worry about aren't syntax errors that quickly get caught by the compiler, but subtle semantic ones. D is designed to make it easier to catch those.
Jun 13 2002
Walter wrote:"Karl Bochert" <kbochert ix.netcom.com> wrote in message news:1103_1023868581 bose...I like the semicolons.. they're pretty.The editor I use, Epsilon, does automatic indenting, and I find itinvaluable.Many errors are caught when the editor indents strangely due to a missing semicolon, dangling else etc. It seems to me that I have seen an editorthatmarks the extent of blocks in the left margin. You're right though -- much more could be done.The kinds of errors I worry about aren't syntax errors that quickly get caught by the compiler, but subtle semantic ones. D is designed to make it easier to catch those.
Jun 14 2002
"Sean L. Palmer" <seanpalmer earthlink.net> wrote in message news:ae6ql5$1c6h$1 digitaldaemon.com...Oh well I can live with semicolons. Not a big deal. It's better than having to surround every statement with parenthesis or braces.Heh! =)
Jun 12 2002
"Sean L. Palmer" wrote:Oh well I can live with semicolons. Not a big deal. It's better than having to surround every statement with parenthesis or braces.Or whitespace, like some languages. :) Heck, in Korn shell (I think bash is the same), these two lines are different: if [[ $a="asdf" ]]; then if [[ $a = "asdf" ]]; then The first is a syntax error because it tries to do an assignment in the test...the second is a legal comparison. :(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.Amen! Hoorah! Preach on, brother! I love D, and plan to use it as my only practical language (once the Linux version comes out) - but I have a number of ideas simmering in the back of my mind about what a language *should* be. On a somewhat related note, I've often thought that it would be nice to embed various types of documents into my source code. For instance, what if your comment could be in the form of a document from a word processor, inlined into the source document? Or what if, instead of having a big block of constants to initialize an array of structures, you could inline a spreadsheet and have the rows from the spreadsheet be the various array elements? Stuff like that. -- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]
Jun 12 2002
"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in messageOn a somewhat related note, I've often thought that it would be nice toembedvarious types of documents into my source code. For instance, what ifyourcomment could be in the form of a document from a word processor, inlinedintothe source document? Or what if, instead of having a big block ofconstants toinitialize an array of structures, you could inline a spreadsheet and havetherows from the spreadsheet be the various array elements? Stuff like that.Coolness. You could initialize a string from a hyperlink to a text file or a word processor document. Have a function take a bitmap as an argument, but a hyperlink to a bitmap file on disk would work too (the compiler generates the call to the "load bitmap file from disk" function to convert it). But you're talking about embedding via OLE. Hmm...
Jun 12 2002
"Sean L. Palmer" wrote:"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in messageMy original vision was OLE-esque. But the hyperlink idea works, too. Your IDE could expand the hyperlink (if you so desired) to display the included document inline without putting an OLE-reading requirement on the compiler. Heck, if you used hyperlinks, you could be referencing stuff accessible through HTTP, FTP, or whatever. Leads to some interesting possibilities for cooperative development - especially if you can import http files as well! -- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]On a somewhat related note, I've often thought that it would be nice toembedvarious types of documents into my source code. For instance, what ifyourcomment could be in the form of a document from a word processor, inlinedintothe source document? Or what if, instead of having a big block ofconstants toinitialize an array of structures, you could inline a spreadsheet and havetherows from the spreadsheet be the various array elements? Stuff like that.Coolness. You could initialize a string from a hyperlink to a text file or a word processor document. Have a function take a bitmap as an argument, but a hyperlink to a bitmap file on disk would work too (the compiler generates the call to the "load bitmap file from disk" function to convert it). But you're talking about embedding via OLE. Hmm...
Jun 12 2002
PCgrasp draws boxes and things around code as you type. I always turn it of because It annoys me. Any how PCgrasp is lacking in many other areas. I am considering writting a D focused IDE if I get some time. I would like to make it UML focused, like rational rose (or visual modeler) but simpler and with all the programming IDE stuff as well. I'd make it strongly reliant on plugs so that I won't need to write everything and so users could customise it. I would probably have to do it in C++ not D because it supports extenable controls that are in MFC, which win32 doesn't (but I may be wrong). Or is there another way? "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 tookitthat 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 wellas,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 thatdidn'tuse 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 "Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3D065180.651B3109 deming-os.org...legal -"Sean L. Palmer" wrote:likelySomeone *could* write this: int a;b, int c = b+; a = a ++ b; Now what the hell does *that* do? And how is that any more or lesscertainlythan forgetting a semicolon?Sounds like my previous post sounded like a flame. I'm sorry - Ididn't mean it that way. What I was trying to illustrate was that a simple typo resulted inbutIunintended code. I thought that the example was useful because at firstwastogoing to agree with you. However, when the counterexample crossed mymind, Ichanged my opinion. For that reason, I thought that it was a good wayillustrate my (changed) opinion. My argument is just a variant of Walter's old argument: "If any binarystreamof data is a valid code, then there are no syntax errors. Syntax errorsgiveyou a simple sanity check to catch (some of the) invalid code." I thinkthatsemicolons do remarkably well in that role. Again, sorry for any flamish posts...
Jun 12 2002
I think Epsilon could be a good place to start! Were I capable, I would just streamline the program for D only. Of course you could just add support for D given the many different languages in which the mass probably programs. It is already available for WinDoze, Linux, FreeBSD, and OS/2 platforms (source code provided). Andrew "anderson" <anderson firestar.com.au> wrote in message news:ae7jdn$jpl$1 digitaldaemon.com... | PCgrasp draws boxes and things around code as you type. I always turn it of | because It annoys me. Any how PCgrasp is lacking in many other areas. | | I am considering writting a D focused IDE if I get some time. I would like | to make it UML focused, like rational rose (or visual modeler) but simpler | and with all the programming IDE stuff as well. I'd make it strongly reliant | on plugs so that I won't need to write everything and so users could | customise it. | | I would probably have to do it in C++ not D because it supports extenable | controls that are in MFC, which win32 doesn't (but I may be wrong). Or is | there another way? | | | | "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 | > | > "Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message | > news:3D065180.651B3109 deming-os.org... | > > "Sean L. Palmer" wrote: | > > | > > > Someone *could* write this: | > > > | > > > int a;b, | > > > | > > > int c = b+; | > > > a = a ++ b; | > > > | > > > Now what the hell does *that* do? And how is that any more or less | > likely | > > > than forgetting a semicolon? | > > | > > Sounds like my previous post sounded like a flame. I'm sorry - I | > certainly | > > didn't mean it that way. | > > | > > What I was trying to illustrate was that a simple typo resulted in | legal - | > but | > > unintended code. I thought that the example was useful because at first | I | > was | > > going to agree with you. However, when the counterexample crossed my | > mind, I | > > changed my opinion. For that reason, I thought that it was a good way | to | > > illustrate my (changed) opinion. | > > | > > My argument is just a variant of Walter's old argument: "If any binary | > stream | > > of data is a valid code, then there are no syntax errors. Syntax errors | > give | > > you a simple sanity check to catch (some of the) invalid code." I think | > that | > > semicolons do remarkably well in that role. | > > | > > Again, sorry for any flamish posts... | > | > | > | |
Jun 12 2002
Apone looking at Epsilon It seems little more then a text editor with text highlighting and lots of nifty functions. Don't get me wrong, it does have some great features. It does seem to be lacking in things like help as you write (things like showing the parameters of functions you call as you write). It doesn't seem to have project managment (being able to show class structure and more then one source at once). And as far as I can see it doesn't have much graphical support for things such as UML. Parhaps these issues may be addressable? Parhaps the code could be extended to include these features. Parhaps some overlay program could be written and use Epsilon as the code editor, using OLE or something. Anyway these are just my thoughts. "Andrew" <crxace13 comcast.net> wrote in message news:ae7k1d$qir$1 digitaldaemon.com...I think Epsilon could be a good place to start! Were I capable, I would just streamline the program for D only. Of course you could just add support for D given the many different languages in which the massprobablyprograms. It is already available for WinDoze, Linux, FreeBSD, and OS/2 platforms (source code provided). Andrew "anderson" <anderson firestar.com.au> wrote in message news:ae7jdn$jpl$1 digitaldaemon.com... | PCgrasp draws boxes and things around code as you type. I always turn it of | because It annoys me. Any how PCgrasp is lacking in many other areas. | | I am considering writting a D focused IDE if I get some time. I would like | to make it UML focused, like rational rose (or visual modeler) but simpler | and with all the programming IDE stuff as well. I'd make it strongly reliant | on plugs so that I won't need to write everything and so users could | customise it. | | I would probably have to do it in C++ not D because it supportsextenable| controls that are in MFC, which win32 doesn't (but I may be wrong). Oris| there another way? | | | | "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 reactoccasionally.| ;) | > 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, aswell| 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 | > | > "Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message | > news:3D065180.651B3109 deming-os.org... | > > "Sean L. Palmer" wrote: | > > | > > > Someone *could* write this: | > > > | > > > int a;b, | > > > | > > > int c = b+; | > > > a = a ++ b; | > > > | > > > Now what the hell does *that* do? And how is that any more orless| > likely | > > > than forgetting a semicolon? | > > | > > Sounds like my previous post sounded like a flame. I'm sorry - I | > certainly | > > didn't mean it that way. | > > | > > What I was trying to illustrate was that a simple typo resulted in | legal - | > but | > > unintended code. I thought that the example was useful because at first | I | > was | > > going to agree with you. However, when the counterexample crossedmy| > mind, I | > > changed my opinion. For that reason, I thought that it was a good way | to | > > illustrate my (changed) opinion. | > > | > > My argument is just a variant of Walter's old argument: "If any binary | > stream | > > of data is a valid code, then there are no syntax errors. Syntax errors | > give | > > you a simple sanity check to catch (some of the) invalid code." I think | > that | > > semicolons do remarkably well in that role. | > > | > > Again, sorry for any flamish posts... | > | > | > | |
Jun 12 2002
"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 tookitthat 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 wellas,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 thatdidn'tuse 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. SeanSean, 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
Jun 26 2002
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...view.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 tookitthat 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 wellas,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 textOr to a class hierarchy view. The raw text view is so restrictive and antiquated in comparison. One could make a programming language thatdidn'tuse 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. SeanSean, 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
Jun 27 2002
Racking my brain to think of a simple case: How about this case, for(int n; n<Max && !isFound(n); n++); if (n != Max) //found at n-1 { ... } but without semicolon for(int n; n<Max && !isFound(n); n++) if (n != Max) //found at n-1 { ... } Beep - ERROR This would mean manditory bracks are needed for the complier to make sense of it. "Sean L. Palmer" <seanpalmer earthlink.net> wrote in message news:advgr5$2seb$1 digitaldaemon.com...I would like to humbly ask that semicolons not be mandatory statement separators in D, but that they be equivalent to newline, and that newlineisa potential statement separator, semicolon is a definite one, andsemicolon+ newline is treated as only one separation. if (ihadacoollanguage) { int a = b + c int k = b + c + d + e // these don't count because they don't parse in the same places comma and semicolon do. int j = b + c + d + e // it actually has to be looking for a comma or semicolon for a newline to work instead // or it at least needs the remaining fragment to not to compile without treating the eoline as a terminator char[] thisstillworkshowever(char[]a, // comma is ok, it's just notnecessarychar[]b // comma optional because there's a newline instead char[]c; // semi optional wherecommais accepted? char[]d); } I mean, I would like my compiler to not pick nits about semicolons. If I forget one, so friggin what it usually doesn't matter... the compiler has figured it out that it indeed was a missing semicolon big friggin deal,justdeal with it and move on. It should be a warning at best. In order forthecompiler to figure out that a semicolon is missing, it is known that a semicolon must be inserted to fix the problem, but since that's a legalfixit should just do it. It's like real english, sometimes you Dot all you're P"s and q's and someTimes you don't, and yes the code would be nicer if you did all your grammar homework or weren't lazy it's not crucial to get the point across. Allowing slop in syntax allows one to do quick "phrasing" while blockingoutthe code and clean up the subtle issues later. (if this ever becomes an issue because maybe the program works perfectly as written) Sometimes you just wanna test something quickly and do some cut'n'paste and the lastthingyou want to see is some stupid "you forgot a semicolon" problems. Yes I realize it would maybe create a few bugs; about as many as for(;;); has. Number of bugs created by a construct is proportional to the numberoftimes that construct is used by someone. Useful constructs willinherentlygenerate more bugs up to a point. Sean
Jun 14 2002
"anderson" <anderson firestar.com.au> wrote in message news:aee9k9$1baf$1 digitaldaemon.com...How about this case, for(int n; n<Max && !isFound(n); n++);The compiler won't allow you to do this, anyhow. You need to use { } for both cases. So, the funny thing is, the first case would give an error, while the second won't =)
Jun 14 2002
There I go again, putting my foot in my mouth. "Pavel Minayev" <evilone omen.ru> wrote in message news:aeeleo$1m8q$1 digitaldaemon.com..."anderson" <anderson firestar.com.au> wrote in message news:aee9k9$1baf$1 digitaldaemon.com...How about this case, for(int n; n<Max && !isFound(n); n++);The compiler won't allow you to do this, anyhow. You need to use { } for both cases. So, the funny thing is, the first case would give an error, while the second won't =)
Jun 15 2002
I usually put braces there in any case because they're more visible than a semicolon. Sean "anderson" <anderson firestar.com.au> wrote in message news:aee9k9$1baf$1 digitaldaemon.com...Racking my brain to think of a simple case: How about this case, for(int n; n<Max && !isFound(n); n++); if (n != Max) //found at n-1 { ... } but without semicolon for(int n; n<Max && !isFound(n); n++) if (n != Max) //found at n-1 { ... } Beep - ERROR This would mean manditory bracks are needed for the complier to make sense of it.
Jun 15 2002
"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. SeanYes, 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
Jun 26 2002
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...aI usually put braces there in any case because they're more visible thansemicolon. SeanYes, 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
Jun 26 2002
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!
Jun 27 2002
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:aI usually put braces there in any case because they're more visible thanappropriate font. I usesemicolon.Semicolons (and other punctuation) is much easier to see with thea font that enhances these characters and it does change what I considerreadable!
Jun 27 2002
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 thoughyoureyes 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 notpartof a core language spec. ;( Sean "Karl Bochert" <kbochert ix.netcom.com> wrote in message news:1103_1025228880 bose...thanOn 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 visibleaappropriate font. I usesemicolon.Semicolons (and other punctuation) is much easier to see with thea font that enhances these characters and it does change what I considerreadable!
Jun 27 2002