Welcome, Guest. Please login or register.

Author Topic: potential PPC Amiga REAL CHEAP  (Read 139893 times)

Description:

0 Members and 2 Guests are viewing this topic.

Offline Waccoon

  • Hero Member
  • *****
  • Join Date: Apr 2002
  • Posts: 1057
    • Show all replies
Re: Time to celebrate!
« Reply #29 from previous page: February 02, 2006, 09:24:02 AM »
Quote
Lou:  @Waccoon
I wasn't trying to look cool by using b+=1 vs. b=b+1, just pointing out there's less chance of a logic error when the code is split up with one function per line. It's easier to debug.

Uh, you were actually comparing "+=" to "++".

C is perfectly capable of using "+=", which means your example effectively is C code.  A better example would be nice.

Quote
Lou:  I mean it's just a fugly language that makes for poor readability and prone to bad indexing, illegal referencing and logic errors.

Everyone knows these problems don't exist in non-C lanugage, of course.

As with most topics in this thread, you're trying too hard to defend or bash one particular way of doing things.  You don't keep your options open, or even care to know about them.

Quote
Koaftder:  yes, your {{{}}} example is cute

Indeed.  Good programmers don't nest lots of loops.  C also doesn't require code to be broken into blocks in most cases.  Brackets are designed to improve readability, if used wisely.

Thus, the endless debate about whether to use open brackets at the end of a line or on a new line by itself.  Personally, I prefer the end-of-line structure, but C doesn't force anyone to do that.  That's what's nice about the structure of C code.  For the most part, it doesn't dictate form, like many BASICs do.

Quote
Lou:  /* let me count...did I use enough closing brackets? */

*cough*  Try indenting, or at least use the "[ code]" tag when you want to show examples in a forum.

If you don't indent when using "THEN", "ELSE", and "END IF", does that improve readability?

Quote
Lou:
If ... THEN

I find keywords to be much harder to read than brackets, capitalized or not.  But, that's just me.

Quote
Lou:  Dim i as short

This is easier to read than "int i=0;"?
 

Offline Waccoon

  • Hero Member
  • *****
  • Join Date: Apr 2002
  • Posts: 1057
    • Show all replies
Re: Time to celebrate!
« Reply #30 on: February 05, 2006, 10:53:44 AM »
Quote
Developers has their favorite environment and it doesn't matter what anyone else thinks of it unless mandated to change it by a superior or sheer curiosity.

Yes, and the developers of C made their decisions based on what they felt was usable, not because they didn't have the memory to do it the way you like it.

If C sucks, why do so many languages do things the C way?  Visual Basic has an awful lot of C in it, if you know anything about the original BASIC language.  Almost all BASICs these days are not actually BASIC.

Quote
Waccoon, you can run your mouth all you want. So because I had 2 classes in C/C++ some 15 years ago, I'm supposed to remember every nuance?

First of all, you should remember basic things like operators.  Second, you need to know the basics if you're going to say that something sucks.  Third, you're sitting in front of the world's largest electronic library, so it takes minimal effort to look-up things you've forgotten.

Quote
Because they keep expecting me to change it as if I should worship the keyboard they type on.

More like, when you provide an example to show that C sucks, you use poorly formatted code.  Brackets on the wrong line, for example, and using brackets when you don't need them.  Your constant exaggeration and misrepresentation is what annoys people.  You cover it up by saying, "I only took 2 classes 15 years ago."

Well, rip out your old books and have another look.  But then, you don't need C, which is precisely why you need to complain about it.

Why do I complain about inconsistencies in PHP?  Because I need to maintain code written in PHP, and would like to see some improvements in the near future.  Why don't I go around telling people VB sucks?  Because while I have used it in the past, I don't need it today.
 

Offline Waccoon

  • Hero Member
  • *****
  • Join Date: Apr 2002
  • Posts: 1057
    • Show all replies
Re: Time to celebrate!
« Reply #31 on: February 06, 2006, 06:35:34 AM »
Quote
My poorly formatted code was because I didn't specify it as code so the tabs weren't processed by this PHP-based (C for the web) forum.

It was also because you intentionally put brackets in the wrong places.  You missed that part.

BTW, BBcode is a standard applicable to all languages, not just PHP.  Why point out that this forum is written using "C for the web" when your inability to use BBcode is to blame?

And, yes, the switch construct is a much better example.  Probably the best example, as everyone hates writing all those breaks.  However, if you need a fall-through structure, VB doesn't support that.  You have to write the same code several times over.  I use fall-through a lot to handle version control.