C is a Middle level language....

Discussion in 'C Programming' started by adgaur.niit@gmail.com, Dec 21, 2008.

  1. Guest

    Developed by Denis richi.............
    , Dec 21, 2008
    #1
    1. Advertising

  2. Coos Haak Guest

    Op Sun, 21 Dec 2008 08:02:02 -0800 (PST) schreef :

    > Developed by Denis richi.............


    Your spelling of his name is not even middle level.
    --
    Coos
    Coos Haak, Dec 21, 2008
    #2
    1. Advertising

  3. "Jujitsu Lizard" <> writes:
    [...]
    > If you can't consistently write correct code, you SHOULD be using another
    > language.


    Do you know anyone who *can* consistently write correct code?
    I certainly can't; I make mistakes.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Nokia
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Dec 22, 2008
    #3
  4. Ian Collins Guest

    Jujitsu Lizard wrote:
    >
    > If you can't consistently write correct code, you SHOULD be using another
    > language.
    >

    Which self correcting language would you recommend?

    --
    Ian Collins
    Ian Collins, Dec 22, 2008
    #4
  5. Jujitsu Lizard wrote:
    > If you can't consistently write correct code, you SHOULD be using another
    > language.


    ....which implies that C should not be used by anyone.


    August
    August Karlstrom, Dec 22, 2008
    #5
  6. James Kuyper Guest

    Richard Heathfield wrote:
    > August Karlstrom said:
    >
    >> Jujitsu Lizard wrote:
    >>> If you can't consistently write correct code, you SHOULD be using
    >>> another language.

    >> ...which implies that C should not be used by anyone.

    >
    > Since anyone who can't consistently write correct code should not be
    > using /any/ programming language, we can draw the further
    > conclusion that nobody should be programming *at all*. Whilst I
    > don't actually agree with this rather extreme position, it would
    > certainly be tempting to use Sturgeon's Law to sack 90% of the
    > programmers out there, and then sit back and wait for the fabulous
    > stuff that the remaining 10% will eventually produce.


    The remaining 10% will be swamped wasting their time and skills taking
    care of the routine tasks that the other 90% used to take care of. They
    won't have much time to spare to do anything "fabulous" (they will have
    some time to spare).
    James Kuyper, Dec 23, 2008
    #6
  7. On Dec 23, 9:02 am, "Jujitsu Lizard" <> wrote:

    > In C you can do marvelous things like:
    >
    > a)Continuing to use a block of memory after it has been deallocated.
    >
    > b)Returning a pointer to an automatic variable, which is then used after the
    > stack frame has expired.
    >
    > c)Allowing an integer array index to roll over backwards, setting up to
    > corrupt (for example), unrelated memory or the stack frame.



    All of those can be caught with:

    gcc -Wall -fmudflap -lmudflap
    Tomás Ó hÉilidhe, Dec 23, 2008
    #7
  8. Phil Carmody Guest

    Ian Collins <> writes:
    > Jujitsu Lizard wrote:
    >>
    >> If you can't consistently write correct code, you SHOULD be using another
    >> language.


    Note to Keith - 'consistently' doesn't mean 'always'.
    I'm sure Keith and Ian et al. do consistently write
    correct code. I'd like to think I do too. But no-one
    is perfect.

    > Which self correcting language would you recommend?


    LOGO. You might not get what you initially intended, but at
    least you can *always* call it "art".

    Phil
    --
    I tried the Vista speech recognition by running the tutorial. I was
    amazed, it was awesome, recognised every word I said. Then I said the
    wrong word ... and it typed the right one. It was actually just
    detecting a sound and printing the expected word! -- pbhj on /.
    Phil Carmody, Dec 23, 2008
    #8
  9. Guest

    On Dec 22, 2:23 pm, "Jujitsu Lizard" <> wrote:
    > That would be Dennis Ritchie:
    >
    > http://en.wikipedia.org/wiki/Dennis_Ritchie
    >
    > C in my opinion is "just right".
    >
    > The reason is that if you go too high-level, there are performance
    > implications.
    >
    > C is, plus or minus a little, a structured assembler.
    >
    > C gives you enough rope to hang yourself (no array bounds checking, etc.),
    > but on the other hand you can write those things yourself if you so desire
    > and you really won't take a performance hit over a "high-level" lanugage, as
    > your compiled code will do about the same things that the compiled
    > "high-level" language would do.
    >
    > If you can't consistently write correct code, you SHOULD be using another
    > language.
    >
    > --
    > Jujitsu Lizard ()


    I'm a big fan of C + datastructure tools. I find C + datadraw to be
    higher performance than C alone, while more productive for EDA
    applications than C++. The problems with higher level languages is
    they make a lot of assumptions about the target application. They
    assume we can afford some loss in performance, and that we mostly need
    static inheritance rather than the ability to dynamically extend
    objects that already exist in a database. Both assumptions are wrong
    for most EDA programs. They also do simple one-class implementation
    inheritance which isn't even capable of doing a decent performance
    linked-list, because it optimally involves adding functionality to two
    classes rather than just one. Graphs, the heart of most EDA
    applications, are a PITA to describe generically in most high-level
    languages, though Java does a better job than C++, IMO. Then there's
    garbage collection. Modern languages assume they can help us by
    eliminating the need to call "delete" on an object, but we have to
    remove it from all database relationships anyway. They saved me one
    line of code, but I still have to write my own destructors from
    scratch.

    There's a reason most new EDA applications are still written in C, and
    it's not that programmers are stupid.
    , Dec 23, 2008
    #9
  10. writes:
    [...]
    > I'm a big fan of C + datastructure tools. I find C + datadraw to be
    > higher performance than C alone, while more productive for EDA
    > applications than C++.

    [...]
    >
    > There's a reason most new EDA applications are still written in C, and
    > it's not that programmers are stupid.


    That might make more sense if you told us what "EDA" means.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Nokia
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Dec 23, 2008
    #10
  11. user923005 Guest

    On Dec 22, 6:09 pm, "Jujitsu Lizard" <> wrote:
    > "Keith Thompson" <> wrote in message
    >
    > news:...
    >
    > > "Jujitsu Lizard" <> writes:
    > > [...]
    > >> If you can't consistently write correct code, you SHOULD be using another
    > >> language.

    >
    > > Do you know anyone who *can* consistently write correct code?
    > > I certainly can't; I make mistakes.

    >
    > Let's start by making sure that we have the same definition of "consistent".
    >
    > From dictionary.com:
    >
    > Reliable; steady: demonstrated a consistent ability to impress the critics.
    >
    > I don't think consistency as it is commonly used requires 100% success.  I
    > think 80% might be enough.
    >
    > If I write 1000 lines of code and 2 are wrong ... that meets my definition.


    Consistent makes no sense in this context. If 100% of the lines of
    code are bad each and every time, then the code is consistent. If 50%
    of the code is bad each and every time, then the code is consistent.
    If 0% of the code is bad each and every time then the code is
    consistent. So what has consistency told us? Nothing that I can
    discern.

    I suspect that the word we are searching for here is "reliable".

    Bad and unreliable code can be written in any language.
    Good and reliable code can be written in any language.

    Excellence in reliability for the code base is going to be (in the
    largest fraction) a function of the people chosen to do the job.

    IMO-YMMV
    user923005, Dec 23, 2008
    #11
  12. jameskuyper Guest

    user923005 wrote:
    > On Dec 22, 6:09�pm, "Jujitsu Lizard" <> wrote:
    > > "Keith Thompson" <> wrote in message
    > >
    > > news:...
    > >
    > > > "Jujitsu Lizard" <> writes:
    > > > [...]
    > > >> If you can't consistently write correct code, you SHOULD be using another
    > > >> language.

    > >
    > > > Do you know anyone who *can* consistently write correct code?
    > > > I certainly can't; I make mistakes.

    > >
    > > Let's start by making sure that we have the same definition of "consistent".
    > >
    > > From dictionary.com:
    > >
    > > Reliable; steady: demonstrated a consistent ability to impress the critics.
    > >
    > > I don't think consistency as it is commonly used requires 100% success. �I
    > > think 80% might be enough.
    > >
    > > If I write 1000 lines of code and 2 are wrong ... that meets my definition.

    >
    > Consistent makes no sense in this context. ...


    That's an ironic comment to make, given that the following discussion
    completely ignores the context:

    > ... If 100% of the lines of
    > code are bad each and every time, then the code is consistent. If 50%
    > of the code is bad each and every time, then the code is consistent.
    > If 0% of the code is bad each and every time then the code is
    > consistent.


    In itself, that's correct. However, the context resolves all of the
    uncertainty that you've introduced by ignoring the context. The
    discussion wasn't about "consistent code". The context of this
    subthread is the phrase "can't consistently write correct code", and
    those few extra words rules out the possibility the phrase refers to
    code that is consistently bad.
    jameskuyper, Dec 23, 2008
    #12
  13. user923005 Guest

    On Dec 23, 9:35 am, jameskuyper <> wrote:
    > user923005 wrote:
    > > On Dec 22, 6:09 pm, "Jujitsu Lizard" <> wrote:
    > > > "Keith Thompson" <> wrote in message

    >
    > > >news:...

    >
    > > > > "Jujitsu Lizard" <> writes:
    > > > > [...]
    > > > >> If you can't consistently write correct code, you SHOULD be using another
    > > > >> language.

    >
    > > > > Do you know anyone who *can* consistently write correct code?
    > > > > I certainly can't; I make mistakes.

    >
    > > > Let's start by making sure that we have the same definition of "consistent".

    >
    > > > From dictionary.com:

    >
    > > > Reliable; steady: demonstrated a consistent ability to impress the critics.

    >
    > > > I don't think consistency as it is commonly used requires 100% success. I
    > > > think 80% might be enough.

    >
    > > > If I write 1000 lines of code and 2 are wrong ... that meets my definition.

    >
    > > Consistent makes no sense in this context. ...

    >
    > That's an ironic comment to make, given that the following discussion
    > completely ignores the context:
    >
    > > ...  If 100% of the lines of
    > > code are bad each and every time, then the code is consistent.  If 50%
    > > of the code is bad each and every time, then the code is consistent.
    > > If 0% of the code is bad each and every time then the code is
    > > consistent.

    >
    > In itself, that's correct. However, the context resolves all of the
    > uncertainty that you've introduced by ignoring the context. The
    > discussion wasn't about "consistent code". The context of this
    > subthread is the phrase "can't consistently write correct code", and
    > those few extra words rules out the possibility the phrase refers to
    > code that is consistently bad.


    I was replying to the definition provided in the post I responded to.
    user923005, Dec 23, 2008
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    438
  2. =?Utf-8?B?Sm9l?=

    page-level vs control-level enableViewState

    =?Utf-8?B?Sm9l?=, Oct 26, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,925
    S. Justin Gengo
    Oct 26, 2005
  3. Replies:
    8
    Views:
    459
  4. mike
    Replies:
    1
    Views:
    1,131
    Martin Honnen
    Nov 20, 2004
  5. pabbu
    Replies:
    8
    Views:
    719
    Marc Boyer
    Nov 7, 2005
Loading...

Share This Page