"Not just your C; C sucks in general. As a case in point, the C case statement is next-to-worthless, because fallthrough is not usually what you want. There are cases for it, but they're the exception rather than the rule. "

I have to disagree here, currently I'm writing quite a bit of C(C++ really) code and I have switches all over the place. I choose the switch construct BECAUSE I can have multiple values that should map to a block of code, so the fall-through is exactly why I use the switch statement. Just because the projects you have written code that does not use a construct does not say that no one uses it. If your code calls for a if/else tree then write one, when you find someplace that could use a switch, then go ahead and use it.

If I have only a few possible values, or it makes more sense then I use a if-else ladder.

I have hit quite a few places where I wished Perl had a case/switch statement.
That all being said I believe that you have to pick a language for the situation, right now we need high performance (simulation) software so we use C/C++. When we have non-speed critical code that can be more easily written in Perl, then that is the language we use. Remember, Perl was written in C, I'm not saying that makes it better, just useful. :)

I can handle people's opinions, but coming out and saying "Language X sucks" is a little harsh.

In reply to Re: Re: Eek! goto? by Helter
in thread Eek! goto? by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.