Why most of the people here on my school prefer this language?

This is a discussion on Why most of the people here on my school prefer this language? within the C# Programming forums, part of the General Programming Boards category; Originally Posted by medievalelks The sales schtick by the snake oil salesmen of both languages has doubtless led to sloppy, ...

  1. #16
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,256
    Quote Originally Posted by medievalelks
    The sales schtick by the snake oil salesmen of both languages has doubtless led to sloppy, leaking code.
    I would give them the benefit of the doubt and say that it is just a case of where the Law of Leaky Abstractions takes effect.

    Quote Originally Posted by Cat
    1. You actually have a pointer to the memory somewhere that you haven't gotten rid of. Not truly a leak, just bad coding.
    In a way, with a modern OS that reclaims memory when the process is terminated, this would then be true for C and C++ programs as well. "Not truly a leak, just bad coding."
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  2. #17
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    Quote Originally Posted by Cat View Post
    That's been the diametric opposite of my experience; most of the listings I've seen want C# or Java.
    That has been my experience as well.

    Quote Originally Posted by Cat View Post
    ...or simply can't happen (e.g. memory leaks from failing to destroy objects).
    Memory leaks happen quite often to me in C#, generally when I forget that I'm not in C++, and need to explicitly free some resource. Generally this happens when you beat the GC, and try to access a resource that it hasn't yet free'd - such as reading a file that you recently wrote, and the old file object hasn't yet been garbage collected. The fix is obvious to a C# programmer: I should have free'd it manually by using .Close() or using(). But I'm a C++ programmer - I'm used to stuff deterministically freeing itself when it goes out of scope. :-)

    Quote Originally Posted by Cat View Post
    GUI work is also fast and incredibly easy in C#. I used to do my GUI work in MFC back in the day, and before that I did pure WINAPI, and C# GUI work is almost a joke it's so simple.
    C# GUI work does make Win32 look incredibly slow, I will admit. However, I still find it incredibly hard to do some basic tasks (have a dialog that is not resizable, but it fitted to it's contents! This was hard in Win32, and subsequently everything else, as Win32 controls have no way to get a bestfit size...)

    I feel like you left out some of the better parts of the language - lambda expressions, a really, really awesome standard library (half of System, including String, regexes, threading, containers, binary file io, and more!)

    I'm a C++ guy. My advice to the OP would be to learn at least C++, if not C or some close language. Knowing memory management is invaluable. I've seen programmers go both ways: C++ to Java/C#, and C#/Java to C++, and the C#/Java programmers coming into C++ generally have the harder time.

    That said, I see a lot of people wanting programmers for C# or Java, and I program primarily in C# for the place I work. (I do a bit of VB6 too - don't shoot me, it's not by choice...)
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Programming language - Which one should people learn today?
    By Christopher2222 in forum A Brief History of Cprogramming.com
    Replies: 25
    Last Post: 09-25-2008, 09:17 AM
  2. Should it be legalized?
    By abachler in forum A Brief History of Cprogramming.com
    Replies: 168
    Last Post: 06-08-2008, 09:56 AM
  3. What language did they make Java in?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 07-03-2005, 05:18 PM
  4. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 02:40 PM
  5. Religious Bull****
    By Witch_King in forum A Brief History of Cprogramming.com
    Replies: 119
    Last Post: 10-23-2001, 08:14 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21