Subject: Re: Aw: Re: [stella] OT: Programming, CS theory From: Erik Mooney <erik@xxxxxxxxxx> Date: Fri, 26 Oct 2001 11:03:39 -0400 |
Apologies for the topic drift... 10/26/2001 8:10:46 AM, cybergoth@xxxxxxxx wrote: >As for another topic in this thread: I think the sheer beautiness and style >of something simple like > >bEqual = (a==b) ? true : false > >is way better than forcing it by all means into a structure like I probably won't be the only one to point this out, but that statement is still bloated and unnecessary :) bEqual = (a==b); Which you can in fact do in BASIC anyway! 10/26/2001 6:08:14 AM, KhrysSun@xxxxxxx wrote: > I think everything becomes natural when practicing enough and have a clear > idea of the syntax. When programming in C++, just forget the BASIC and > don't try to compare the 2 language... it will be easier. That's what everybody keeps telling me, but the problem is I think in BASIC. When I decide to write a for loop, my mind immediately goes to the BASIC FOR/NEXT construct and I have to translate that into C++ as I'm writing. > my advice : Imagine you are reading a book, and consider { }; as a > paragraph and have a visual look on it to understand the code. > so ... Personally, I think the whole "white space doesn't matter" is a big misguided blight on C. Line breaks are by far the most natural way for humans to parse written text. Semicolon doesn't naturally connote "end of thought". And for me, all the semicolons and braces add visual "noise" that I have to mentally filter out when I'm trying to read and comprehend C code. > if (a==b) { > > if (b<10) { > } and right here I have to go through an extra mental subroutine to process whether or not to put a semicolon here... > else { > }; > > }; > > ...become immediatly very easy to understand for For my money, this is light-years more immediately and intuitively understandable: If a = b Then If b < 10 statement Else statement End If End If - Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Re: [stella] OT: Programming, C, TwoHeaded Software | Thread | Re: Aw: Re: [stella] OT: Programmin, Glenn Saunders |
Re: [stella] dead link??, Joel Park | Date | Re: [stella] OT: Programming, CS th, Kennehan, Richard |
Month |