Page 3 of 12 FirstFirst 12345 ... LastLast
Results 21 to 30 of 112

Thread: Mono Developers Regret Doing Moonlight In C++

  1. #21
    Join Date
    Dec 2012
    Posts
    364

    Default

    I prefer D, and I am yet to see a program in D that doesn't look beautiful (that's kind of the point of the language, actually). Of course, again, you can do much of the things you can do in C (except the exceptionally horrible and unsafe things), so I guess ugly D code does exist, but the language goes out of its way to provide all means to write clever and easy to understand code, which is rewarding in and of itself.
    As someone who also loves D, it is nigh-impossible to justify it over C++. You have the drunetime overhead, the compulsory GC, and modern C++ is painfully good enough that it is hard to justify D over it, especially when C++14 will probably have concepts lite instead of contracts which is one of the major D features I love to death.

  2. #22
    Join Date
    Jan 2011
    Posts
    1,287

    Default

    Quote Originally Posted by lano1106 View Post
    thanks for the comment. Yes complexity in my post was ambigious. What I had in mind is with C++ features, it gets out of the way a lot of boilerplate code that the language takes care for you. Yes you can emulate RTTI, polymorphism and constructor/destructor with C but the cost will be a lot of lines of code. So let say this unnecessary boilerplate code represents 25% of the C code, this is adding 'complexity' to the task figuring what the other 75% does.

    One of my favorite C++ idiom is RAII. This idom alone usually simplify a lot the code of a function and removes a lot of potential for future leaks.

    Again, I understand where C++ bad reputation comes from. I have seen really bad code that made me swear. Writting readable C++ with good OO design is quite rare.
    I think I've got your post backwards, and my guess is it was a translation problem (either from your language to english, or in my reading of english, which is not my main language). When I read "trading dev time", etc, I thought you meant you sacrifice that, not that you gain that, and that you gain ease of use in exchange of that sacrifice, and that's what sounded strange to me, as ease of use is, IMO, related to gaining in dev time, complexity (where gaining is reducing it), etc.

    In defense of C++, in my short experience, ugly C++ is far nicer than ugly C. At least in ugly C++ you get classes, which usually hint you on what belongs together (which is important when you find projects with colossal dependencies because someone glued together huge amounts of unrelated pieces into single files).

  3. #23
    Join Date
    Jan 2010
    Location
    Somewhere in Kansas.
    Posts
    206

    Default

    I am a programmer. You don't use C or C++ unless you have to. Other languages are so much nicer and more importantly quicker to write in. Though I would consider C++ nicer than C because of the ability to have objects.

  4. #24
    Join Date
    Dec 2012
    Posts
    364

    Default

    Quote Originally Posted by ua=42 View Post
    I am a programmer. You don't use C or C++ unless you have to. Other languages are so much nicer and more importantly quicker to write in. Though I would consider C++ nicer than C because of the ability to have objects.
    I am also a programmer. I write C++ a lot, because I often end up writing critical sections in it. I also write a lot of qt programs, and while I try to use qml and js whenever possible, I don't hesitate to write, just an example, a patterned density histogram generatedin real time on mutagenic data in C++ for the performance and threading.

    Trying to use it as a kitchen sink would be an exercise in nuance and pain, but the same can be said of any programming language.

  5. #25
    Join Date
    Jan 2013
    Posts
    911

    Default

    Icaza is to Linux, like Elop to Nokia. You can't take him seriously, after he admitted not using Linux for more than several years, whilst being head of GNOME, then abandoning Linux development altogether and doing pure proprietary on Mac; and also calling Stallman zealot completely ignoring four freedoms of GPL. Cxx is perfectly fine, pefectly portable and perfectly patent clear. iCaza should be banned from Linux for good.

  6. #26
    Join Date
    Oct 2007
    Location
    Under the bridge
    Posts
    2,099

    Default

    Quote Originally Posted by lano1106 View Post
    thanks for the comment. Yes complexity in my post was ambigious. What I had in mind is with C++ features, it gets out of the way a lot of boilerplate code that the language takes care for you. Yes you can emulate RTTI, polymorphism and constructor/destructor with C but the cost will be a lot of lines of code. So let say this unnecessary boilerplate code represents 25% of the C code, this is adding 'complexity' to the task figuring what the other 75% does.
    Hey, but at least you can consume a shared object built with gcc in your clang or icc project. Try doing that with C++ for a laugh.

    One of my favorite C++ idiom is RAII. This idom alone usually simplify a lot the code of a function and removes a lot of potential for future leaks.
    And RAII is a poor man's implementation of reflection. So bad, actually, that Qt had to implement a meta-language complete with parser, just to get some semblance of logical GUI code. RAII is so much worse than what a modern language can do that it's not even funny.

    Quote Originally Posted by brosis
    Icaza is to Linux, like Elop to Nokia. You can't take him seriously, after he admitted not using Linux for more than several years, whilst being head of GNOME, then abandoning Linux development altogether and doing pure proprietary on Mac; and also calling Stallman zealot completely ignoring four freedoms of GPL. Cxx is perfectly fine, pefectly portable and perfectly patent clear. iCaza should be banned from Linux for good.
    Good thing he's stopped writing about Linux then. You may rejoice, but it's a sad day when one of the biggest proponents of Linux turns his back on free software.
    Last edited by BlackStar; 01-04-2014 at 05:37 PM.

  7. #27
    Join Date
    Jun 2013
    Posts
    17

    Angry I am a better programmer than anybody else, and I am right!

    ...or: even a large amount of anecdotal evidence does not add up to data. Even if you are a programmer, your opinion does not amount to truth, nor can be inherently considered better than that of a non-programmer.

    Any comparison between C and C++ must be grounded in some kind of metrics: performance? development time? ease of maintenance? Above all, if the comparison has to be performed "out there" and not based on a list of feature sets, the comparison must follow a scientific, reproducible methodology.

    For example, you can check out the Bhattacharya/Neamtiu study (avalable here). Their conclusion:

    To keep factors such as developer competence or software process uniform, we investigate open source applications written in a combination of C and C++. We formulate four hypotheses that investigate whether using C++ leads to better software than using C. We test these hypotheses on large data sets to ensure statistically significant results. Our analyses demonstrate that applications that start with C as the primary language are shifting their code base to C++, and that C++ code is less complex, less prone to errors and requires less effort to maintain.
    Is C++ better then? Probably not, but in large projects the resulting code is less complex, less buggy and easier to maintain, unless - of course - you are able to provide a scientific study refuting the methodology/conclusions of the one linked above.

    On another note...
    <troll_mode>
    I am of the opinion that having written Moonlight is something to regret per se, regardless of the language used! :P
    </troll_mode>

  8. #28
    Join Date
    Mar 2008
    Posts
    197

    Default

    c++'s biggest problem is that it doesn't really establish a "this is how you should do things" paradigm. What typically happens is that it ends up being over engineered and misused with things like overuse of inheritance, abuse of encapsulation, classes with too many mutable methods which means difficult to track state. And too many folks still like to junk up the global namespace with mutables, just crazy stuff.

    Honestly I can't imagine being able to reliably create robust readable code that provides good high level algorithms like graphs, matrices, polynomials, etc with 'c'. Perhaps something like mono doesn't need access to high level stuffs like this considering mono is just another low level tool itself.

  9. #29
    Join Date
    Sep 2008
    Location
    Vilnius, Lithuania
    Posts
    2,396

    Default

    Quote Originally Posted by ua=42 View Post
    I am a programmer. You don't use C or C++ unless you have to. Other languages are so much nicer and more importantly quicker to write in.
    I agree. The killer feature of C and C++, though, is their vast library support, and that often times forces the language choice.

    Quote Originally Posted by ua=42 View Post
    Though I would consider C++ nicer than C because of the ability to have objects.
    Personally I don't like the syntax of the C++ features so I prefer C, but that's just me.

  10. #30
    Join Date
    Jan 2013
    Posts
    911

    Default

    Quote Originally Posted by BlackStar View Post
    Good thing he's stopped writing about Linux then. You may rejoice, but it's a sad day when one of the biggest proponents of Linux turns his back on free software.
    He changed after his comeback from MS. I will not hesitate to think he was trying to get a warm chair for exchange of fixing their management things up, but instead was offered to work undercover. I mean, even Wikipedia has an article on his behavior. After seeing the pro-ms submarine "mono" not giving ROI (ecosystem corruption / bribe), he once again stated how he hates Linux and FLOSS in general and marched towards Mac, with a goal to corrupt iOS as a platform, to free up more marketshare to winmo as well as coordinate the .net base there. Now, with Android and Steam on the rise, he will try to get back with a tongue in cheek.

    If you want Linux to be successful - do the opposite of what iCaza recommends.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •