Thread: is C appropriate for intro to computers?

  1. #106
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    Elysia is a very typical ideologue. Usually people grow out of this though. Hopefully he/she is just someone who is young. Otherwise, we're dealing with someone who doesn't learn as they age and will probably terrorize the board for a long, long time.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  2. #107
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Mario F. View Post
    >> C# simply can't do what C and C++ can, what with memory manipulation, raw speed, etc.

    One of the largest stock martkets in the world disagrees with you.
    As does NASA, the US Military, many banks across the world and other financial institutions, hospitals, and entire governments.

    But you are wiser and more knowledgeable. They will listen.
    Seriously, they use it because to them, it's more beneficial.
    They don't need the raw speed, memory manipulation, raw speed, etc, of C/C++.
    They need what C# offers - lots of functionality, lots of security, etc.

    And no, I'm not wiser and more knowledgeable.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #108
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    I agree Mario F

    It's going to be pretty harsh if you get a job with say Microsoft and tell them to get rid of this C# crap, and use "powerful" C++ instead. You claim C++ is faster to develop than C (or can be), by that logic why wouldn't you choose C#!? Or some other managed language where many, many, many things are provided.

    > Assembler is worst possible language possible. It should only be used when you absolutely have no other choice.
    By that denomination, you shouldn't be using C or C++. Or if you had a choice, you wouldn't be compiling to assembly from C++? Straight to machine code eh? I'd love to see your compiler.

    You CAN have memory leaks with smart pointers... and when you do they're usually 99x harder to find and debug. Because the "smart pointer" thinks it's smarter than you are. Stop bashing C for not having OO features and alike. Sure you like C++, but there is no need to bash C everytime someone mentions it.

    > And in my very humble opinion, they should not, and people who does that are morons,
    > unless they have a very, very, very good reason, and I cannot find one.
    I do it. For learning, portability. It's also great for teaching, last time I checked CPUs were not object oriented. And I'm not cutting off the group of people that may want to use a library in a C or C++ application.

    You seem to have an answer to everything... which is fantastic! I can't wait to see your name in the next "PC" magazine. "Boy revolutionizes the software development industry. No more C#, C, Assembly, etc. C++ the way of the future!"

  4. #109
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Pfft. No one is listening.
    I don't use/like C# because it's managed. And I have on at least one occasion stated why. The end.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #110
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Elysia View Post
    The end.
    It could be. But it's left to say on the particular case of said stock market exchange one of the biggest requirements is exactly near real-time execution, as is on most banks and financial institutions. So, your speed arguments doesn't fit either. Sorry.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #111
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    while I'm not an advocate of C# or Java per se, it is no longer true that virtual machine based languages are inherently slow. Many advocates argue strongly that Java and C# are comparably fast to C++ (I'm not saying that exactly). There is very little down side to C# in reality.

    See JIT compilation

    Bottom line, choose your language based on personal preference, but don't talk down to me for my choices.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  7. #112
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by FillYourBrain View Post
    while I'm not an advocate of C# or Java per se, it is no longer true that virtual machine based languages are inherently slow. Many advocates argue strongly that Java and C# are comparably fast to C++ (I'm not saying that exactly). There is very little down side to C# in reality.
    Yes, this is true, but it's still slower on startup and also still slower than C/C++, although not terribly slower, but I simply don't buy that.
    I don't want any cuddly, duddly things that tells me what I can do or can't, plus the fact that the stupid thing is compiled on-the-fly.
    If there were lots of security checks in native code, for C++, then I would accept that, but...

    C# reminds me of typical stupid or lazy VB programmers, which there are a lot of out there.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #113
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    reminds you of something you don't like so it makes it bad? That's some great logic... I hope you don't vote.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  9. #114
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Do you read?
    I don't like it because of several reasons AND it reminds me of something.
    I don't like it BECAUSE it reminds me.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #115
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    I never learned how to read.

    On your other point... slower. It's really not. Part of the benefit of garbage collection paradigm is that you have delayed memory release. When the meat of an algorithm is running and the hardware should most be utilized you aren't bogging down your program with dynamic memory issues.

    edit:
    This makes it faster than C++ on those occasions.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  11. #116
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I don't buy garbage collection. I like the old smart pointer style.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #117
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    then use C++! Good for you, you've made a choice! Your choice however is no more legit than others.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  13. #118
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    This is kind of like asking "which is the best Operating System" (though that always results in a huge flame war too!) It totally depends on the specific situation, but for an introductory course it's not a huge deal, people! You want to learn the concepts, feel comfortable with SOMETHING, etc...

  14. #119
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    For the record, I don't deny that everyone has a right to choose their own preference of a language to develop with for specific platforms.
    However, it is a good idea, for newbies anyway, to try to learn a language targeted at a specific platform when developing for that platform.
    Example, if a newbie wants to design computer software, it would be better to learn C++ or C# rather than C. By doing this, they get a handful of advantages because they would be familiar with a language that is aimed at a specific platform. It would avoid the whole I'm more fluent in X targeted at Y, but I'm developing for Z problem.

    This is also one of the reasons I tend to drag C down under.
    Of course it's subjective, but at least they will know a little of this and that and can decide for themselves.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #120
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by FillYourBrain View Post
    This makes it faster than C++ on those occasions.
    What really makes GCed languages faster is allocation, not deallocation. With an unmanaged heap, allocating a block of memory means searching for a free block of sufficient size, splitting a piece off it, and updating the management data to reflect the new situation. All this has to be done under a mutex, of course.

    With a compacting garbage collector like .Net's, allocating is adding an integer to a pointer. Since GCs usually stop the world for the actual compacting, this can be done without a mutex, with a simple atomic CAS loop. Under normal circumstances, this is magnitudes faster; under heavy contention, it's even more extreme.

    While a compacting GC may also be faster on release under some circumstances, this difference is far less extreme and doesn't apply in all circumstances. It most definitely doesn't apply to non-compacting, conservative garbage collectors like those you can get for C++ (e.g. Boehm).
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Numeric addresses for computers
    By great in forum C Programming
    Replies: 4
    Last Post: 08-23-2010, 11:53 AM
  2. Computers as authors
    By hk_mp5kpdw in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 11-22-2004, 08:55 PM
  3. Industrial vs home computers
    By nbo10 in forum Tech Board
    Replies: 10
    Last Post: 09-01-2004, 02:04 AM
  4. Matrix and vector operations on computers
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-11-2004, 06:36 AM
  5. Love programming, hate computers
    By PJYelton in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 12-14-2002, 01:04 PM