Why do you like C more than other programming languages?

Discussion in 'C Programming' started by istillshine@gmail.com, Jul 8, 2008.

  1. Guest

    There are many languages around: C++, JAVA, PASCAL, and so on. I
    tried to learn C++ and JAVA, but ended up criticizing them. Is it
    because C was my first programming language?

    I like C because, comparatively, it is small, efficient, and able to
    handle large and complex tasks.

    I could not understand why people are using and talking about other
    programming languages.
     
    , Jul 8, 2008
    #1
    1. Advertising

  2. santosh Guest

    wrote:

    > There are many languages around: C++, JAVA, PASCAL, and so on. I
    > tried to learn C++ and JAVA, but ended up criticizing them.


    Then you are probably prejudiced. Each language has certain merits and
    demerits. You must try not to approach other languages from a C point
    of view and vice versa. You will likely end up judging them unfairly or
    inappropriately.

    > Is it because C was my first programming language?


    No. It's probably because you are, despite what you might tell yourself,
    probably looking to criticise.

    > I like C because, comparatively, it is small, efficient, and able to
    > handle large and complex tasks.
    >
    > I could not understand why people are using and talking about other
    > programming languages.


    Because some types of programming are made more efficient by languages
    specifically meant for them. C is a general purpose language and while
    it can theoretically be programmed to do any computation possible on a
    Turing machine, many tasks are rendered easier to accomplish with
    specific languages. You will appreciate this if you attempt widely
    varied programming tasks.
     
    santosh, Jul 8, 2008
    #2
    1. Advertising

  3. In article <>,
    <> wrote:
    >There are many languages around: C++, JAVA, PASCAL, and so on. I
    >tried to learn C++ and JAVA, but ended up criticizing them. Is it
    >because C was my first programming language?


    >I could not understand why people are using and talking about other
    >programming languages.


    One uses the best tool for the task at hand.

    At work, these days I mostly use two programming languages,
    MATLAB and Maple.

    MATLAB has been designed to provide interactive prototyping of a mix of
    array operations and graphics; it is suitable for the needs of my major
    task because that major task involves R&D of a package for visualizing
    the results of performing various mathematical operations upon data
    sets. Formal design is not especially practical in our environment,
    as we change our mind several times a day about what we're trying to do,
    as our experiences or further thoughts or additional papers tell us
    more about what does or does not work, so a prototyping language is
    appropriate for the task. When we've figured out what we want done
    and how it should be done, a team will take it over and re-write it
    in a structured language such as C or C++.

    Maple I use to compute symbolic formulae. It has an extensive
    library of symbolic manipulation routines; it would be completely
    impractical for us to use C to write routines to do complicated
    symbolic integration. No point in re-inventing the wheel!
    I don't use Maple for any kind of hard-core numeric evaluation
    of data: I use it to figure out good ways to express formulae.
    For example, for solving simultaneous non-linear equations
    and then finding a compact form for expressing the parametric
    form of the intersection.

    --
    "Is there any thing whereof it may be said, See, this is new? It hath
    been already of old time, which was before us." -- Ecclesiastes
     
    Walter Roberson, Jul 8, 2008
    #3
  4. Ron Ford Guest

    On Tue, 8 Jul 2008 03:31:41 +0000 (UTC), Walter Roberson posted:

    > In article <>,
    > <> wrote:
    >>There are many languages around: C++, JAVA, PASCAL, and so on. I
    >>tried to learn C++ and JAVA, but ended up criticizing them. Is it
    >>because C was my first programming language?

    >
    >>I could not understand why people are using and talking about other
    >>programming languages.

    >
    > One uses the best tool for the task at hand.
    >
    > At work, these days I mostly use two programming languages,
    > MATLAB and Maple.
    >
    > MATLAB has been designed to provide interactive prototyping of a mix of
    > array operations and graphics; it is suitable for the needs of my major
    > task because that major task involves R&D of a package for visualizing
    > the results of performing various mathematical operations upon data
    > sets. Formal design is not especially practical in our environment,
    > as we change our mind several times a day about what we're trying to do,
    > as our experiences or further thoughts or additional papers tell us
    > more about what does or does not work, so a prototyping language is
    > appropriate for the task. When we've figured out what we want done
    > and how it should be done, a team will take it over and re-write it
    > in a structured language such as C or C++.
    >
    > Maple I use to compute symbolic formulae. It has an extensive
    > library of symbolic manipulation routines; it would be completely
    > impractical for us to use C to write routines to do complicated
    > symbolic integration. No point in re-inventing the wheel!
    > I don't use Maple for any kind of hard-core numeric evaluation
    > of data: I use it to figure out good ways to express formulae.
    > For example, for solving simultaneous non-linear equations
    > and then finding a compact form for expressing the parametric
    > form of the intersection.


    I thought Walter might express an affinity to perl, which I've seen him
    post when asked a question that needed a language appropriate to perl's
    purview.

    You never really can get away from C, try as you will. I have affairs with
    syntaxes but find the influence of C is always right under the hood. In my
    syntax of choice, fortran, they defined an ISO_C_BINDING last standard
    around. It's public comments now for the new standard, so it's getting a
    little thick there.
    --
    Democracy is the art and science of running the circus from the monkey
    cage.
    H. L. Mencken
     
    Ron Ford, Jul 8, 2008
    #4
  5. Dand Guest

    <> wrote in message
    news:...
    > There are many languages around: C++, JAVA, PASCAL, and so on. I
    > tried to learn C++ and JAVA, but ended up criticizing them. Is it
    > because C was my first programming language?
    >
    > I like C because, comparatively, it is small, efficient, and able to
    > handle large and complex tasks.
    >
    > I could not understand why people are using and talking about other
    > programming languages.


    I think on any low-level tasks its by far the best choice and in many cases
    the only real alternative to assembly.

    As for high-end PC software, I would probably say no. Try programming even a
    simple windows API ap and you will see why, 1000 lines of code just to get
    one window to appear.
     
    Dand, Jul 8, 2008
    #5
  6. jacob navia Guest

    Dand wrote:
    > <> wrote in message
    > news:...
    >> There are many languages around: C++, JAVA, PASCAL, and so on. I
    >> tried to learn C++ and JAVA, but ended up criticizing them. Is it
    >> because C was my first programming language?
    >>
    >> I like C because, comparatively, it is small, efficient, and able to
    >> handle large and complex tasks.
    >>
    >> I could not understand why people are using and talking about other
    >> programming languages.

    >
    > I think on any low-level tasks its by far the best choice and in many cases
    > the only real alternative to assembly.
    >
    > As for high-end PC software, I would probably say no. Try programming even a
    > simple windows API ap and you will see why, 1000 lines of code just to get
    > one window to appear.
    >
    >



    This is not true.

    You can use the windows API in C. Many compilers under windows
    will generate a windows skeleton for you. lcc-win, for instance
    needs 2-3 clicks in a "wizard" and you get all the basic framework
    written for you.

    The advantage of using the windows API is that you are NOT tied to
    a specific library and you get the advantage of using and reusing
    the same code in all versions of windows.

    I started writing the IDE of lcc-win under windows 16 bits. It was
    ported to 32 bits, then to 64 bits with much less effort than it
    would have been if I was dependent on a third party library.

    Take MFC for instance. The last version of it dated from
    1998. Recently (some months ago) Microsoft decided to bring a new
    update, the first since 1998. If you program using MFC you
    would have been forced to use the API anyway since the library
    wasn't updated.

    Other libraries like Borland's or the hundreds of libraries that
    were developed have all disappeared. Programming in C with the
    raw API is a guarantee that your code will survive.

    --
    jacob navia
    jacob at jacob point remcomp point fr
    logiciels/informatique
    http://www.cs.virginia.edu/~lcc-win32
     
    jacob navia, Jul 8, 2008
    #6
  7. Bartc Guest

    <> wrote in message
    news:...
    > There are many languages around: C++, JAVA, PASCAL, and so on. I
    > tried to learn C++ and JAVA, but ended up criticizing them. Is it
    > because C was my first programming language?
    >
    > I like C because, comparatively, it is small,


    C is deceptively small. It's so small that some ten years on hardly anyone
    has managed to create a full compiler for the latest standard... and some
    compilers have lists of options that are bigger than your entire
    application!

    >efficient


    It's not bad, but when I needed speed I had to use asm code.

    >, and able to handle large and complex tasks.


    Yeah, it's able to.

    I think it wasn't for it's #define statement to program your way of trouble,
    C's usefulness would be seriously diminished.

    In fact #define may well be the most important feature in C. (Although,
    #define may also have hindered C's normal development as a language:
    everytime someone proposes a genuine improvement, someone else will come up
    with an ugly #hack, sorry, #define, macro to do the same job nearly, but not
    quite, as well.)

    --
    Bartc
     
    Bartc, Jul 8, 2008
    #7
  8. In article <>,
    Ron Ford <> wrote:
    >On Tue, 8 Jul 2008 03:31:41 +0000 (UTC), Walter Roberson posted:


    >> At work, these days I mostly use two programming languages,
    >> MATLAB and Maple.


    >I thought Walter might express an affinity to perl, which I've seen him
    >post when asked a question that needed a language appropriate to perl's
    >purview.


    Yes, I use perl when I have something perl-ish to do. However,
    my job duties changed a few years ago, from systems work to R&D,
    so it is now far less common that perl is the right tool for
    what I am doing these days; it was a good tool when I needed to do
    practical text extraction and reporting such as using SNMP probes
    to detect whether someone had illicitly moved a device to another port
    in our network.
    --
    "It is surprising what a man can do when he has to, and how
    little most men will do when they don't have to."
    -- Walter Linn
     
    Walter Roberson, Jul 8, 2008
    #8
  9. Kaz Kylheku Guest

    On 2008-07-08, <> wrote:
    > There are many languages around: C++, JAVA, PASCAL, and so on. I
    > tried to learn C++ and JAVA, but ended up criticizing them. Is it
    > because C was my first programming language?


    No, that's not the reason. It's because if those are the alternatives you are
    looking at---C++, Pascal, Java---then of course C looks damn good.

    > I could not understand why people are using and talking about other
    > programming languages.


    Maybe because there are languages in which you can write things which would
    require ten to one hundred times as much syntax in C, not counting the
    code in the libraries that would have to be supplied to actually make that
    syntax work.

    Are you retarded or what?
     
    Kaz Kylheku, Jul 8, 2008
    #9
  10. Linonut Guest

    * Dand peremptorily fired off this memo:

    > <> wrote in message
    > news:...
    >> There are many languages around: C++, JAVA, PASCAL, and so on. I
    >> tried to learn C++ and JAVA, but ended up criticizing them. Is it
    >> because C was my first programming language?
    >>
    >> I like C because, comparatively, it is small, efficient, and able to
    >> handle large and complex tasks.
    >>
    >> I could not understand why people are using and talking about other
    >> programming languages.

    >
    > I think on any low-level tasks its by far the best choice and in many cases
    > the only real alternative to assembly.
    >
    > As for high-end PC software, I would probably say no. Try programming even a
    > simple windows API ap and you will see why, 1000 lines of code just to get
    > one window to appear.


    Huh? Try gtk+, then.

    I like C++ a lot, but have lately taken to writing stuff in C and then
    wrappering it.

    Python is not bad, though indenting the wrong lines of code by accident
    can screw things up.

    Perl is nice for word manipulations.

    Ruby, well, I haven't used it enough, but....

    I still prefer C/C++ -- the compile-time type-checking is very nice.

    --
    VMS is like a nightmare about RXS-11M.
     
    Linonut, Jul 8, 2008
    #10
  11. Linonut Guest

    * jacob navia peremptorily fired off this memo:

    > You can use the windows API in C. Many compilers under windows
    > will generate a windows skeleton for you. lcc-win, for instance
    > needs 2-3 clicks in a "wizard" and you get all the basic framework
    > written for you.
    >
    > The advantage of using the windows API is that you are NOT tied to
    > a specific library and you get the advantage of using and reusing
    > the same code in all versions of windows.


    Yeah, but, dude! It's /Windows/!!!

    > Other libraries like Borland's or the hundreds of libraries that
    > were developed have all disappeared. Programming in C with the
    > raw API is a guarantee that your code will survive.


    At least until Microsoft gets Windows Presentation Foundation working.

    Or you can adopt cross-platform GUI library's such as Qt, gtk, Fox,
    Tk/Tcl, or wxWidgets.

    --
    No one becomes depraved in a moment.
    -- Decimus Junius Juvenalis
     
    Linonut, Jul 8, 2008
    #11
  12. <snip>
    >> Other libraries like Borland's or the hundreds of libraries that
    >> were developed have all disappeared. Programming in C with the
    >> raw API is a guarantee that your code will survive.

    >
    > At least until Microsoft gets Windows Presentation Foundation working.

    </snip>

    If they decide to deprecate the whole raw windows API then programmers will
    just ignore that version of windows and normal users will try to avoid it
    because none of the programs they like work on it. In short, it will fail
    even faster and more completely than Vista
    So why would they do that? It'll only cost them money
     
    Harold Aptroot, Jul 8, 2008
    #12
  13. jacob navia Guest

    Harold Aptroot wrote:
    > <snip>
    >>> Other libraries like Borland's or the hundreds of libraries that
    >>> were developed have all disappeared. Programming in C with the
    >>> raw API is a guarantee that your code will survive.

    >>
    >> At least until Microsoft gets Windows Presentation Foundation working.

    > </snip>
    >
    > If they decide to deprecate the whole raw windows API then programmers
    > will just ignore that version of windows and normal users will try to
    > avoid it because none of the programs they like work on it. In short, it
    > will fail even faster and more completely than Vista
    > So why would they do that? It'll only cost them money


    Exactly.
    C# would not work, neither would .net. They all use at the end
    the windows API.

    Yes, They will bring new stuff, but... did you know?

    I installed a pre-release of VISTA more than a year ago,
    and what did I see in C:\ ?

    AUTOEXEC.BAT
    CONFIG.SYS

    Microsoft has sometimes a funny attitude towards compatibility but
    it has greatly contributed to their success.



    --
    jacob navia
    jacob at jacob point remcomp point fr
    logiciels/informatique
    http://www.cs.virginia.edu/~lcc-win32
     
    jacob navia, Jul 8, 2008
    #13
  14. Bartc Guest

    "Richard Heathfield" <> wrote in message
    news:D...
    > Dand said:
    >
    > <snip>
    >
    >> Try programming
    >> even a simple windows API ap and you will see why, 1000 lines of code
    >> just to get one window to appear.

    >
    > You are exaggerating by a very, very, very great margin. To get one window
    > to appear, you need only call CreateWindow (or, if it is already created,
    > ShowWindow) - one line of code. If it is the *first* window of its type to
    > appear, then you must first set up an appropriate window class (not the OO
    > kind) - i.e. define and populate a reasonably small struct - and then call
    > a function to register the class.


    A C program to show one window, and enter a message loop, is about 90 lines,
    according to the skeleton code produced by Dev-C++.

    So Dand was only exaggerating by an order of magnitude; you on the other
    hand were exaggerating the other way by two orders of magnitude..

    --
    Bartc
     
    Bartc, Jul 8, 2008
    #14
  15. rahul Guest

    On Jul 8, 7:52 am, wrote:
    > There are many languages around: C++, JAVA, PASCAL, and so on.  I
    > tried to learn C++ and JAVA, but ended up criticizing them.


    > I like C because, comparatively, it is small, efficient, and able to


    At the same time, C is so small that you have to rely on third-party
    libraries(graphics, networking, threading etc), losing portability in
    the process. I am not trying to demean C but when you are considering
    a language, you have to consider both sides of the coin.

    > handle large and complex tasks.

    Agreed. If system as large and complex as Linux Kernel and Windows can
    be written in C, pretty much anything can be written in C. But the
    point is, how convenient is it going to be writing that "anything".

    > I could not understand why people are using and talking about other
    > programming languages.

    You won't use a chain-saw to drive a nail, will you? It isn't about
    what you can possibly do something in a particular language but its
    about how easy it is. Consider perl - a text processing program
    written in perl is way, way shorter than the equivalent written in
    C(generally). But no one would consider writing a device driver in
    perl.

    At the end of the day, its not the language but the programmer.
     
    rahul, Jul 9, 2008
    #15
  16. CBFalconer Guest

    copx wrote:
    > "Bartc" <> schrieb:
    >

    .... snip ...
    >
    >> C is deceptively small. It's so small that some ten years on
    >> hardly anyone has managed to create a full compiler for the
    >> latest standard...

    >

    .... snip ...
    >
    > If Microsoft, Borland, the companies behind GCC etc. wanted
    > too they could have released a fully conforming C99 compilers
    > in less than a year. There was and is simply no interest /
    > profit in doing that.


    The basic reason is that, back in the 1990 era, compilers sold for
    considerable dollars. Today they are generally free. This greatly
    reduces the profit incentive.

    --
    [mail]: Chuck F (cbfalconer at maineline dot net)
    [page]: <http://cbfalconer.home.att.net>
    Try the download section.
     
    CBFalconer, Jul 9, 2008
    #16
  17. Ian Collins Guest

    copx wrote:
    > "copx" <> schrieb im Newsbeitrag news:g51pok$45q$...
    > [snip].
    >> That's not true. The "professional" version of the Microsoft's
    >> compiler (for example) costs big bugs. Also they DO aim to
    >> support current standards .. namely the current C++ standard,
    >> the OpenMP standard, etc.
    >> It is just C they don't care about. Does any big developer
    >> still sell a plain C compiler? They all sell C++ "Development Studios"
    >> or what they call it which just happen to support some C mode
    >> for legacy apps. This is usually not even managed on the product
    >> page.

    >
    > "managed" should be "mentioned" here.
    >

    While your at it, "costs big bugs" was rather amusing.

    --
    Ian Collins.
     
    Ian Collins, Jul 9, 2008
    #17
  18. Ian Collins Guest

    Ian Collins wrote:
    > copx wrote:
    >> "copx" <> schrieb im Newsbeitrag news:g51pok$45q$...
    >> [snip].
    >>> That's not true. The "professional" version of the Microsoft's
    >>> compiler (for example) costs big bugs. Also they DO aim to
    >>> support current standards .. namely the current C++ standard,
    >>> the OpenMP standard, etc.
    >>> It is just C they don't care about. Does any big developer
    >>> still sell a plain C compiler? They all sell C++ "Development Studios"
    >>> or what they call it which just happen to support some C mode
    >>> for legacy apps. This is usually not even managed on the product
    >>> page.

    >> "managed" should be "mentioned" here.
    >>

    > While your at it, "costs big bugs" was rather amusing.
    >

    While you're

    --
    Ian Collins.
     
    Ian Collins, Jul 9, 2008
    #18
  19. On 8 Jul, 11:00, "Bartc" <> wrote:
    > <> wrote in message
    > news:...


    > > There are many languages around: C++, JAVA, PASCAL, and so on. I
    > > tried to learn C++ and JAVA, but ended up criticizing them. Is it
    > > because C was my first programming language?


    maybe. Try
    - a global substitution in a large code base.
    (new -> NEW_) [perl]
    - drawing a picture [python]
    - querying a database [SQL]

    even things like socket programming are cleaner in say
    Python than C. Yes C can bind to libraries that do
    these things but it can't do them out of the box.

    [prediction 1: someone will submit code to do the above]
    [prediction 2: "yes but XXXX can only do these things because of the
    libraries" <yawn>]

    Uou need to read a lisp book.

    > > I like C because, comparatively, it is small,

    >
    > C is deceptively small. It's so small that some ten years on hardly anyone
    > has managed to create a full compiler for the latest standard...


    I don't think it's the size that causes the problem. I think
    there isn't enough demand for the new standard. The original
    C89 has plenty of compilers. I reject your "C is deceptivly small"


    > and some
    > compilers have lists of options that are bigger than your entire
    > application!


    :)



    > >efficient

    >
    > It's not bad, but when I needed speed I had to use asm code.


    really? What was you application (if you're allowed to say)


    > >, and able to handle large and complex tasks.

    >
    > Yeah, it's able to.


    yup. Eg Unix.


    > I think it wasn't for it's #define statement to program your way of trouble,
    > C's usefulness would be seriously diminished.


    I find this surprising


    > In fact #define may well be the most important feature in C.


    I find this *really* surprising!

    > (Although,
    > #define may also have hindered C's normal development as a language:
    > everytime someone proposes a genuine improvement, someone else will come up
    > with an ugly #hack, sorry, #define, macro to do the same job nearly, but not
    > quite, as well.)


    99% of my uses for #define fall into two groups

    - simple constant definitions
    - defines for #ifdef

    and I try to keep the second group to a bare minimum.

    Another 0.9% comes from hiding __LINE__ and __FILE__
    in diagnostic calls.

    Otherwise I don't heavily use #define. I don't like code
    that does.

    I have defined so huge macros that effectivly acted
    as templates. Given my time over again I'd probably
    have generated the code (it would have made debugging easier).


    --
    Nick Keighley

    Consistency is the last refuge of the unimaginative.
    -- Oscar Wilde
     
    Nick Keighley, Jul 9, 2008
    #19
  20. Chris H Guest

    In message <>, CBFalconer
    <> writes
    >copx wrote:
    >> "Bartc" <> schrieb:
    >>

    >... snip ...
    >>
    >>> C is deceptively small. It's so small that some ten years on
    >>> hardly anyone has managed to create a full compiler for the
    >>> latest standard...

    >>

    >... snip ...
    >>
    >> If Microsoft, Borland, the companies behind GCC etc. wanted
    >> too they could have released a fully conforming C99 compilers
    >> in less than a year. There was and is simply no interest /
    >> profit in doing that.

    >
    >The basic reason is that, back in the 1990 era, compilers sold for
    >considerable dollars. Today they are generally free.


    Generally they are not free. It is just one or two are.

    > This greatly
    >reduces the profit incentive.


    GCC is no more C99 than any other others and there is no profit
    incentive for GCC

    The reason why [almost] no one has done a fully c99 compiler is because
    there is no business case for it. There are not enough significant
    users who want C99

    If there were 99% of the worlds compilers would be C99 by the end of the
    year.

    --
    \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
    \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
    \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
     
    Chris H, Jul 9, 2008
    #20
    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. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,220
    Smokey Grindel
    Dec 2, 2006
  2. John
    Replies:
    0
    Views:
    333
  3. Diego
    Replies:
    2
    Views:
    167
    Stefan Rusterholz
    Aug 16, 2008
  4. Steven D'Aprano
    Replies:
    0
    Views:
    143
    Steven D'Aprano
    Dec 23, 2013
  5. Replies:
    3
    Views:
    116
    Gary Herron
    Dec 23, 2013
Loading...

Share This Page