June 13, 2002 Re: enum | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russ Lewis | "Russ Lewis" <spamhole-2001-07-16@deming-os.org> wrote in message news:3D0647B6.C88EE81F@deming-os.org... > "Sean L. Palmer" wrote: > > What does the colon do, again? > It defines the underlying type of the enum, rather than letting the compiler select it. Yes. If you think about it as being like selecting a "base class", the syntax makes sense. |
June 13, 2002 Re: enum | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert W. Cunningham | "Robert W. Cunningham" <rcunning@acm.org> wrote in message news:3D06B965.445249E6@acm.org... > As several others have noted before, this is one hell of a special group. And > I'm delighted that it has kept its flavor and quality as the D crowd has grown. I doubt I'd have ever thought to toss my random thoughts into any other > forum. That is, I probably wouldn't even have thought the thoughts I wrote. When this group was first set up, I thought it would need moderation (look at com.lang.* newsgroups for comparison). I've been delightfully pleased that it needs none at all. It's like my experience in the compiler business. I've never needed to deal with the problems that other mail order businesses seem to regularly experience. My conclusion is that the products I make simply attract a much higher quality of customer than the competitors do <g>. |
June 14, 2002 Re: enum | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Yes, sounds cool. Sean "Walter" <walter@digitalmars.com> wrote in message news:aeanc7$p3f$3@digitaldaemon.com... > > "Russ Lewis" <spamhole-2001-07-16@deming-os.org> wrote in message news:3D0647B6.C88EE81F@deming-os.org... > > "Sean L. Palmer" wrote: > > > What does the colon do, again? > > It defines the underlying type of the enum, rather than letting the compiler select it. > > Yes. If you think about it as being like selecting a "base class", the syntax makes sense. |
June 26, 2002 Re: enum | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert W. Cunningham | "Robert W. Cunningham" <rcunning@acm.org> wrote in message news:3D056A53.CAC0C830@acm.org... > Matthew Wilson wrote: > > > And a very good thing too. Now if we can wean all the terse programmers away > > from all their other write-once unmaintain-ever-more practises, we should > > really be cooking > > Reminds me of my own torrid programming past. As a deeply-embedded C programmer for 20 years now, one who was brought up on assembler, I still have > this craven need to write monstrously complex functions in two or three lines > of impenetrable obfuscated C. The goal is to do the most with the fewest keystrokes, yet make the fastest possible code. > > My peers hated it. My bosses hated it. When I became independent, my clients > hated it. But you see, sometimes I just had to do it. I couldn't resist. I > want to push C down to the level of finely honed assembly macros (which can get > positively Forth-like if left to their own devices). And if the rest of the > world couldn't understand it, well, it just proved they didn't really know C > all that well. Right? > > To make everyone shut up, I started putting the "correct" code in there as well, then I'd use the preprocessor to switch between the two instances. I > could show the two were functionally equivalent (and on some occasions they > even produced the same code). > > Well, compilers got smarter, the style battles got harder to fight, and programmers got dumber (in a good way ;^). Simple straightforward code is what > everyone wanted, and I finally caved. Now I use braces and semicolons and parentheses everywhere they can legally go. I no longer pay attention to operator precedence: Parens make that a non-issue in all but a very few cases. I no longer ever have "if" and "else" on the same line, and always have > full brace sets between them. > > I no longer define structs and enums in-place, even when they are throw-aways. > I use layer upon layer of typedefs to avoid the magic of tangled Gordian C type > declarations. My include files are huge and comprehensive. I use variable > names with more than one letter, sometimes they may even be found in dictionaries (of some language). Then I started using variable naming conventions, so all my pointers start with p, and member data with m, and so on > to the land of the noted Hungarian. > > Well, I did stop at that last one. Nipped it in the bud. I'm not that far > gone. Not quite yet. > > But then it got worse: I started using "style guides" and "coding standards". > Then I even started writing the damned things! Then my code started to go through the pretty-printer/reformatter without even a single change. (BTW, > "astyle" rocks.) I even started thinking the blasted tools "rocked". I started using lint and "-Wall", and my compiles became warning-free. Pffft. > Warnings are feared only by those who don't know what they mean. > > I had to enter so many more characters in my code that I actually had to stop > looking at the keyboard while I typed. My comment-to-code ratio went from 1:10 > to 2:1, and I even started using documentation generators (which would always > gag on my old code). I had to go to ever-higher display resolutions on ever-larger displays to get enough code visible in a single window to hold a > complete thought. > > My functions had only a single entry and exit and were goto-free, with each > loop fully closed, each if else'd. > > Yes, I truly caved. > > But I still sneak in the occasional line or two of raw distilled power-code. I > am a man, dammit! And I can still code my way out of a paper bag. But I do it > with about 20 lines of surrounding comments. (It feels like wrapping a diamond > in burlap.) > > My "safe" coding has had its cost: I no longer solve those PC-Lint puzzles in > a single glance. Sometimes it takes two glances, taking a pause between them > to adjust the reading glasses on my nose. I no longer "see" code in the empty > editor window, like I did way back when, when the hardest problem was making my > eyes keep up with my fingers on the keyboard. Now I actually have to do designs. And do eye exercises. > > But at least my typing has improved. It allows me to write long, wandering > posts to newsgroups in the blink of an eye. > > I like D simply because it removes so much of the temptation to delve into obfuscation. The only problem is that I have to fire up a Windows system to > use it. > > Did I mention I'm really good on the keyboard? I hate mice. I hate windowing > systems that don't have keystrokes for doing everything. I hate MS Windows. I > hate that D runs only under Windows. I hate that I have to take down my ultra-stable SMP Linux system, and reboot into Win98 (and give up a processor) > to run D. > > But it is worth it, once in a while, if only so I can avoid the seductive siren > call of minimalist C. > > Somebody shoot me. > > > -BobC > > PS: D rocks! > > LOL! :) This is great, and probably should go somewhere in the D Journal! -- Stijn OddesE_XYZ@hotmail.com http://OddesE.cjb.net _________________________________________________ Remove _XYZ from my address when replying by mail |
June 26, 2002 Re: enum | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | "Walter" <walter@digitalmars.com> wrote in message news:aeb9ef$1c72$1@digitaldaemon.com... > > "Robert W. Cunningham" <rcunning@acm.org> wrote in message news:3D06B965.445249E6@acm.org... > > As several others have noted before, this is one hell of a special group. > And > > I'm delighted that it has kept its flavor and quality as the D crowd has grown. I doubt I'd have ever thought to toss my random thoughts into any > other > > forum. That is, I probably wouldn't even have thought the thoughts I > wrote. > > When this group was first set up, I thought it would need moderation (look at com.lang.* newsgroups for comparison). I've been delightfully pleased that it needs none at all. > But I do think an important part of this is that you are on your own server? I have not yet seen a single spamvertisement here, a great relief! Also, on this group there aren't so many people that flame you to death if you post off topic, if you didn't read the f*cking manual or if you simply disagree with them. I love it here and it is one of the only groups I ever go recently. Posting on or even reading comp.lang.c++ just doesn't seem worth it any more... :( > It's like my experience in the compiler business. I've never needed to deal > with the problems that other mail order businesses seem to regularly experience. My conclusion is that the products I make simply attract a much > higher quality of customer than the competitors do <g>. > LOL! :) We can all safely agree with that! -- Stijn OddesE_XYZ@hotmail.com http://OddesE.cjb.net _________________________________________________ Remove _XYZ from my address when replying by mail |
June 27, 2002 Re: enum | ||||
---|---|---|---|---|
| ||||
Posted in reply to OddesE | Agreed. This place is a positive relief from the rough and tumble of other groups, populated by people who seem to care more about impressing others than being helpful/polite. Maybe this is because, in a positive sense, we are all ignorant: D is new. :) "OddesE" <OddesE_XYZ@hotmail.com> wrote in message news:afd8d6$2cbd$1@digitaldaemon.com... > "Walter" <walter@digitalmars.com> wrote in message news:aeb9ef$1c72$1@digitaldaemon.com... > > > > "Robert W. Cunningham" <rcunning@acm.org> wrote in message news:3D06B965.445249E6@acm.org... > > > As several others have noted before, this is one hell of a special > group. > > And > > > I'm delighted that it has kept its flavor and quality as the D crowd has > > > grown. I doubt I'd have ever thought to toss my random thoughts into > any > > other > > > forum. That is, I probably wouldn't even have thought the thoughts I > > wrote. > > > > When this group was first set up, I thought it would need moderation (look > > at com.lang.* newsgroups for comparison). I've been delightfully pleased that it needs none at all. > > > > But I do think an important part of this is that you > are on your own server? I have not yet seen a single > spamvertisement here, a great relief! > > Also, on this group there aren't so many people that > flame you to death if you post off topic, if you > didn't read the f*cking manual or if you simply > disagree with them. I love it here and it is one of > the only groups I ever go recently. Posting on or > even reading comp.lang.c++ just doesn't seem worth > it any more... :( > > > > It's like my experience in the compiler business. I've never needed to > deal > > with the problems that other mail order businesses seem to regularly experience. My conclusion is that the products I make simply attract a > much > > higher quality of customer than the competitors do <g>. > > > > LOL! :) > We can all safely agree with that! > > -- > Stijn > OddesE_XYZ@hotmail.com > http://OddesE.cjb.net > _________________________________________________ > Remove _XYZ from my address when replying by mail > > > |
Copyright © 1999-2021 by the D Language Foundation