|
09-03-2003, 06:13 PM
|
#21 (permalink)
| | | Re: Trying to give up computer | |
| |
09-03-2003, 07:26 PM
|
#22 (permalink)
| | | Re: Trying to give up computer | |
| |
09-04-2003, 12:02 PM
|
#23 (permalink)
| | | Re: Trying to give up computer | |
| |
09-05-2003, 04:29 AM
|
#24 (permalink)
| | | OT: Programming was: Re: Trying to give up computer | |
| |
09-05-2003, 09:52 AM
|
#25 (permalink)
| | | Re: OT: Programming was: Re: Trying to give up computer | |
| |
09-05-2003, 03:14 PM
|
#26 (permalink)
| | | Re: OT: Programming was: Re: Trying to give up computer On 05 Sep 2003 16:52:32 GMT, David Reuteler <reuteler@visi.com> wrote:
> k&r (as in kernighan & ritchie who helped invent C) ..
Yup, familiar with that term anyway, have the book, etc.
> ahh, this is all gonna seem so banal. it's one of those religious wars
> vs vi, linux vs bsd, etc) but they originally supported a coding style
> wrt braces (for all time refered to as k&r style braces) of ..
> if (condition) {
> }
> if (condition)
> {
> }
The second way, with the brace on a new line, is how
it is taught in the class I'm taking. I went in with
the habit of cramming everything possible on one line,
but have since gotten a feel for the reasons to put
everything on seperate lines.
With the braces, I especially like having the opening
and closing brace line up vertically with each other,
something that you can't efficiently do if the opening
brace comes in at character 40...
> trinaries (as in perl) are deadly .. why do:
> $foo = $condition ? 1 : 2;
>
> when you can do ..
>
> if($condition)
> {
> $foo = 1;
> }
> else
> {
> $bar = 2;
> }
I like the ?: operator; it makes things simpler
and more readable *in_some_situations*. It's not
a good replacement for if-else at all, but it's
great for output statements and such.
Of course, both issues, {} and ?:, I would see
differently if I was paid by the line... 
> C is a great language. she's the bitch goddess. all things UNIX come
> her. i really love to write in C but don't get to do it nearly as much
> anymore.
My Linux and BSD experience has really helped me
learn C. I suppose if I had learned C first, I'd
have had an easier time in *nix.
> as a further aside, line counters were a great boon for perl readability.
I should learn perl soon. That would be a good idea.
> previously most perl programmers were really into compressing their 500
> line
> scripts into 20 lines of unreadable regex. furthermore if you use
Ever see the Obfuscated C code contest?
> but i digress.
No!@ We must fill the group with off-topic stuff!
Bicyclists should be in comp.programmers.c or some such!
--
Rick Onanian | |
| |
09-05-2003, 03:22 PM
|
#27 (permalink)
| | | Re: OT: Programming was: Re: Trying to give up computer | |
| |
09-06-2003, 03:08 PM
|
#28 (permalink)
| | | Re: Trying to give up computer | |
| |
09-08-2003, 02:24 PM
|
#29 (permalink)
| | | Re: OT: Programming | |
| |
09-08-2003, 02:30 PM
|
#30 (permalink)
| | | Re: OT: Programming was: Re: Trying to give up computer David Reuteler wrote:
> k&r (as in kernighan & ritchie who helped invent C) ..
Dennis Ritchie invented C. He helped invent UNIX with Ken Thompson.
C was invented for the purpose of writing operating systems; specifically
UNIX.
--Bill Davidson
--
Please remove ".nospam" from my address for email replies.
I'm a 17 year veteran of usenet -- you'd think I'd be over it by now | |
| |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -8. The time now is 07:08 PM.
Powered by vBulletin® Version 3.6.4 Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Style Design by vBStyles.com |