Slashdot Mirror


Mono Poises to Take Over the Linux Desktop

Edd Dumbill writes "Miguel de Icaza and the Mono team recently hosted a two day open meeting in Boston. O'Reilly have just published my report of the meeting. Highlights include Miguel's view that 'C is dead!' and the Mono approach to dealing with Microsoft patents on .NET."

42 of 925 comments (clear)

  1. .NET by Anonymous Coward · · Score: 5, Insightful

    I realize that this is an unpopular opinion here on Slashdot, but C# is actually a pretty cool language and the .NET runtime is a promising platform. Microsoft didn't just dream this up overnight... they had a lot of smart people working a long time creating this beast.

    It would certainly benefit us to learn about these technologies and leverage them, rather than to unilaterally declare them evil, wrong, stupid, etc. and just bury our heads in the sand and pretend they dont exist.

    1. Re:.NET by ivern76 · · Score: 4, Insightful

      I disagree. After a few months of working with C#, I have come to the conclusion that it's nothing but a bastardized clone of Java that had every little piece of sugar they could snarf from VB and C++ added to it, whether it made sense or not.

      For example, the braindamaged distinction between structs and classes as value and reference types respectively. What if you want to make both value and reference objects of the same class? Or treat the same object as value or reference as needed? The stupidity becomes even more apparent when you find out that the System.Array.Initialize() function will only initialize value arrays, not reference arrays (WTF? Is there ANY reason to even have the [,] array creation operator if you still have to construct the members one by one after creation?). I could go on and on about "features" that were clearly hacked on in five minutes to fit some deadline, with little thought or care.

      C# does have some nice things that, say, Java lacks. Operator overloading, automatic boxing and unboxing of primitive types, and properties come to mind. The first two, AFAIK, will be in Java soon, and properties are just syntactic sugar to replace observer methods. Honestly, I'm not impressed, and I don't intend to use C# ever again unless I absolutely have to.

    2. Re:.NET by willdenniss · · Score: 4, Insightful

      here here.

      And, unlike .NET - Java is fully featured across all of it's supported OS's.

      Will.

    3. Re:.NET by grennis · · Score: 4, Insightful
      What if you want to make both value and reference objects of the same class?

      Value/Reference is a class-based distinction. It has nothing to do with instance, and I can't say I've ever had a real world problem with this. Can you?

      Or treat the same object as value or reference as needed?

      Real world example?

      the System.Array.Initialize() function will only initialize value arrays, not reference arrays

      Of course. C++ is no different. Remember how in C++ you have to write "delete [] x" instead of "delete x"? Simply because you have to communicate to the compiler that it must call the destructor on each array member... but the constructor is much more difficult. What if the array element type has no default constructor?

      I could go on and on about "features"

      And I could equally as well refute your points.

      It is ignorant to simply dismiss .NET or C# because it is something you don't know and don't understand. Take the time to learn it... there are valid criticisms, but you haven't found them yet.

    4. Re:.NET by IllForgetMyNickSoonA · · Score: 4, Insightful

      Yeah, sure. Last time I checked, there was no operator overloading in Fortran either. Nevertheless, it is still the preferred language for mathematicians (among others).

      Operator overloading, while in some occasions quite handy, must be used with great care. Unfortunatelly, for quite a lot of programmers out there, it seems to be misused as a yet another way to obfuscate a program into oblivion! If you ever get to analyse the code written by a BOOZFH (Bastard Operator Overloading Zealot From Hell), you'll know what I'm talking about.

    5. Re:.NET by ivern76 · · Score: 4, Insightful

      What if you want to make both value and reference objects of the same class?

      Value/Reference is a class-based distinction. It has nothing to do with instance, and I can't say I've ever had a real world problem with this. Can you?

      Or treat the same object as value or reference as needed?

      Real world example?


      Easy. Value types allow you to transparently create copies of data, essentially letting you deal with immutable objects without the added complexity of calling a clone() operation every time you need a new copy to work with. This has nothing to do with class characteristics, and everything to do with the particular code you're using.

      the System.Array.Initialize() function will only initialize value arrays, not reference arrays Of course. C++ is no different. Remember how in C++ you have to write "delete [] x" instead of "delete x"? Simply because you have to communicate to the compiler that it must call the destructor on each array member... but the constructor is much more difficult. What if the array element type has no default constructor?

      If it has no default constructor, then you make it an error for value types (duh) and a nop on reference types. Alternatively, you could make it an error on both. If there's no default constructor, you don't call Initialize(). Your comparison to C++ loses, because 1) we're not discussing C++, and 2) we're not discussing "telling" the compiler how to do a job, we're discussing how the compiler doesn't do said job no matter how you "tell" it to.

      I could go on and on about "features"

      And I could equally as well refute your points.

      That's great to hear. Start any time you want.

      It is ignorant to simply dismiss .NET or C# because it is something you don't know and don't understand. Take the time to learn it... there are valid criticisms, but you haven't found them yet.

      I wouldn't go as far as to call you ignorant, but I know for certain it's stupid to dismiss my claim without actually addressing it. If you scroll up and actually read my post and yours, you'll notice that you either didn't read my claims properly, didn't think the matter through properly, or didn't type your reply properly.

      Why do I claim this? Well, 1) you don't seem to understand how you can use value and reference types interchangeably in a real world situation, yet you go ahead and talk about it. 2) You try to address my issue with Initialize() by pulling a textbook Chewbacca defense with C++'s delete[] syntax. And 3) you tell me there's "valid criticisms", yet you fail to mention any. All you know is mine don't work, yet you also fail to adequately explain why.

      In the end, I have no option but to classify you as a troll until you prove otherwise. I suggest you start doing so by addressing my initial post with clearly thought out answers.

  2. Foot-in-Mouth Disease by adun · · Score: 5, Insightful

    Aside from being a the primary source of Mediterranean winds, Icaza has apparently forgotten about that whole "Linux" thing that is built on that whole "UNIX" thing that was built using that whole "C" thing. I applaud his salesmanship. I deplore his view that the desktop is equivalent to the operating system.

    1. Re:Foot-in-Mouth Disease by milest · · Score: 5, Insightful

      The article talks about C dying for *user* applications explicitly:
      "A great deal of serious end-user application coding on Linux still goes on in C or C++"
      "Where does this place the future of the Linux desktop..."
      "The expectation for GNOME 3.0, however, is that a lot of the platform will use Mono, rather than the C implementation it has now"

      Probably no one writes kernels in C# and there is less and less reason to write user applications in portable assembly. Programming languages are tools, and we use different tools for different jobs. I prefer to use higher level languages where it is feasible because I'm more productive. I use C where I have to, because it has features that other tools don't.

  3. C is not dead by Yaa+101 · · Score: 3, Insightful

    You need a solid underground when programming...

    MS and solid? hmm...

  4. Learning and applying. by Faust7 · · Score: 4, Insightful

    It would certainly benefit us to learn about these technologies and leverage them, rather than to unilaterally declare them evil, wrong, stupid, etc. and just bury our heads in the sand and pretend they dont exist.

    I think that about a lot of Microsoft technologies -- but to be fair, I'd say that the mere existence of Mono is evidence that a process such as you have described is already in motion.

  5. C lives by Anonymous Coward · · Score: 3, Insightful
    There will still be times for the necessity of optimizing for something for which the .NET JIT compiler will not be sufficient.

    Also, .NET is much like Java, and C hasn't died from the adoption of Java.

  6. Overnight by SuperKendall · · Score: 5, Insightful

    I realize that this is an unpopular opinion here on Slashdot, but C# is actually a pretty cool language and the .NET runtime is a promising platform. Microsoft didn't just dream this up overnight...

    Yes, it took at a least a couple of days to copy all the Java libraries and ReCapitalizeMethods,

    Seriously though, .Net is a nice language with some advancements over Java, but not different enough from Java to make its existence worthwhile. It's just leading to a lot of duplication of effort across the world (like Ant and Nant, or JUnit and NUnit).

    Now if they'd come up with something like Haskel# as the primary language (instead of hamstringing other languages and making all of the core libraries Java like) or something really different that actually advanced the field of programming as a whole, then I might be more appreciative But as it is I see the tremendous duplication of effort across the world to do the same things in Java and C#, and it just makes me sad.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  7. You can't beat Microsoft.... by fatboy · · Score: 4, Insightful

    .....at their own game.

    You can't a better .NET than .NET

    Anyone remember "a better Windows" than Windows called OS/2?

    --
    --fatboy
  8. If I wanted MS .Net, I'd run MS... by Spicerun · · Score: 5, Insightful

    As it is, I don't want to even attempt to emulate another 'grand MS idea'...especially since there are already superior non-MS systems out there that puts .net to shame. No, I'm not going to cite those systems...do your own research. You'd be surprised.

    Die Mono Die!

  9. Re:Um, no. by IAmTheDave · · Score: 5, Insightful

    Yeah, it's crappy. But heck, it's a move in the right direction. I know certain people (cough... slashdotters) are quite protective of the purity of writing unmanaged code.

    But that said, I have never developed software more rapidly than in C#. .NET has trippled my productivity (on the Windows platform) and my approval rating at work has skyrocketed as I have rolled out several solutions on .NET that are stable, solid, and effective.

    I really wish that Linux had a stable .NET equivelent (sp?) - cause then I could completely abandon Windows at home. But as long as I can code C# with such RAD success, Linux is going to have catching up to do.

    I applaud MONO. It's far from ready, but keep going. Keep working. Please - make MONO (or something else) as good as C#, .NET, and Windows Forms (and hell, ASP.NET) is. RAD is so important in the real world, that Linux would only benefit - incredibly - from a .NET like solution.

    --
    Excuse my speling.
    Making The Bar Project
  10. Dealing with MS patents .... by konmaskisin · · Score: 4, Insightful

    1) Rave about C#
    2) Convert everything to run on Mono C# .Net
    3) Get sued bad by the world's most deep pocketed software publisher except that unlike SCO vs. Linux this time the evidence is on the side of plaintif.

  11. What a choice... by eidechse · · Score: 3, Insightful

    I'm not sure I dig the idea that the future of app development comes down to a choice between MS and Sun.

  12. Exactly by SuperKendall · · Score: 5, Insightful

    Exactly, there will be "kind of" a functional language - which has to use the same libraries everyone else does, which are all just like the Java libraries. So people using this pseudo-functional language will be hard-pressed to really see the advantages of a functional language as you would if you had a real function language with a set of libraries as broad as that offered by Java.

    I formed this opinion long ago, just around when C# first came out, when I read an article by one of the founder of Eiffel talking about how Eiffel# would work (I wish I had not lost the link - I can no longer find this article). He saw opportunity at that point to gain new Eiffel programmers. But I saw only a tar baby, where the longer you worked with the system the more you just said "Well, all I'm doing is calling C# libraries with this weird syntax so I might as well make life easier by just using C#". .Net and C# is the perfect vehicle to migrate users of all other languages to C#, not really to make life easier on people who want to work in one of the non-C# languages.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  13. Hell yea PyGTK! by 3cents · · Score: 3, Insightful

    I've been using pygtk on and off for the last year or so and i've got to say that when used in combination with glade it's a real dream to work in. I think if a Visual Basic like IDE could be created for those who are afraid of the deep end of text editor, command line tool development we could have a real open source Visual Basic killer on our hands. And i'll take that over C#/Mono any day of the week.

    slashrank

  14. That is where you are mistaken by SuperKendall · · Score: 5, Insightful

    .Net is the platform in which C# is the closest natural representation of what the bytecode is like. As such, .Net is a vehicle for C# and a distorted reflection of all other languages.

    Yes, .Net is the VM and C# the language. But as Java has shown, it's not really so easy to keep the two wholly separate. They are interdependent to some extent.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  15. Why Mono Will Fail by cryptoluddite · · Score: 5, Insightful

    There is almost no difference between C#/Mono/.NET and Java, but almost no Linux developers write in Java. Check out your distribution's packages and you'll almost see more JVMs than Java apps. And for some reason Linux developers avoid Java like the plague, even though it's got a godzillion features that make everything so much easier (garbage collection, huge consistent class library, security, etc). Put in a GTK or QT library interface instead of the slow and huge Swing (that Smalltalkers foisted on Java) and you're golden -- there's every reason to use Java, especially for applications.

    The Linux culture has so far prevented Linux from taking the next step. Just look the (essentially) complete lack of interest in gcj (gcc open-source java). Just look at the slow pace of Mono. It isn't goind to happen anytime soon, unless the Linux app community wakes up and sees the future. Yeah, 10 years from now we'll still be doing manual memory management. Sure...

  16. This is the time... by Dr.+Sp0ng · · Score: 3, Insightful

    ... to attack Microsoft on the .NET front. We have all the components of a powerful, truly cross-platform development platform; they just need to be packaged in a way which can compete with the cohesive API that is .NET.

    Now, I'm not trying to start a flamewar here, so I'm not going to insist on specifics here, but what needs to be done is to create essentially a "distribution" of a powerful language (I'd use Python), a good cross-platform widget set (I'd use Qt, were it not for the license issues - personally I don't blame Trolltech for the licensing scheme, as $2500 is chump change to any real development house anyway, but in this case it would hinder adoption. Maybe wxWidgets then, or GTK+ configured in a way to appear like native widgets, but gah, GTK+ is such a hideous API), a selection of useful Python (or whatever) modules, and so on.

    Like I said, this is nothing that didn't exist before, but it should be packaged in such a way as to provide a standardized environment on every platform that applications can rely on. Come to think of it, rather than use a specific language like Python, maybe the whole thing should just be wrapped around Parrot.

    Anyway, the specifics don't matter. It's the idea of having a good competitor to .NET with a standardized set of support stuff on each platform, with a single installer to support the entire shebang. Why can't this be done? If I had the time, I would, but I don't. But if there was one place the open source community can take on Microsoft, it's development tools. And the time to do it is before .NET gets too entrenched.

  17. Re:C is Dying? by Canadian1729 · · Score: 3, Insightful

    Saying C is dead is such a stupid comment, it invalidates anything else he might say.

    --

    New news forum for Canadians - CanadaSpeaks
  18. Re:Platform Independence by WombatControl · · Score: 5, Insightful
    Uhm, why would MS do this? .NET is designed to be and sold as a "cross platform" solution--a real way to do Java's "write once, run anywhere" line.

    For the same reason they did it with Java - if it's "write once, run anywhere", then why would you buy Windows licenses? Microsoft (quite naturally) wants everyone to run a Windows server and a Windows client, and having Linux be able to take either role with ease doesn't give them the leverage they need to continue their marketshare.

  19. Re:Um, no. by cerberusss · · Score: 5, Insightful
    I really wish that Linux had a stable .NET equivelent (sp?) - cause then I could completely abandon Windows at home.

    Why don't you use Java?

    --
    8 of 13 people found this answer helpful. Did you?
  20. Re:C is dead? by maraist · · Score: 5, Insightful

    C is inferior, yes. It's hardly dead though.

    I think C deserves a little more respect than a blanket comment like this.

    We still have assembly languages today for several reasons, even though it's been "dead" since the 80's. Driver writers, compiler writers, and high performance inner-loops of scientific apps NEED snippets of assembly.

    Thanks to the design goal of c (as the paint on the metal), you can now program in mixed c/assembly and thus never have to actually write anything in raw assembly files anymore. But you still write with the intention of generating specific sections of assembly.

    The people that write c are those that are resource conscious. I am not aware of ANY other language that is allows resource management as well as C. "performance" is just one resource, and I know many argue that JIT's counter-balance the performance advantages of optimized c. I still refuse to belive JIT's have ever approached -O3 performance, but am willing to concede that a well written VM app can perform acceptibly.

    ButMemory is another key resource management position that sometimes requires hard computer science to derive workable solutions.. When you abstract how resources are utilized (via a VM), then it negates the value of such hard computer science. Note that this ONLY applies to a particular problem space. Though, a non-trivial problem space to be sure.

    The point is thus that the classic paradigm of "the right tool for the job" is essential here. There are MANY problems that are best done with low level, very concise languages like c. Most OS components, VMs, or fast-duty-cycle applications should very well have core work done in c/assembly.

    The obvious other end of the stick is managing large amounts of code, for which assembly need not apply, and c is indeed becoming a distant memory as I think you are implying. Yes, web-services and many such fast-to-deploy applications transcend c, but don't be too quick to write-off the value in having a generation of computer scientists that are not well enough versed at writing low level applications.

    --
    -Michael
  21. Re:Um, no. by bangular · · Score: 3, Insightful

    There isn't a demand for anything like that on linux though. Linux programmers tend to know a few different languages (a couple of high level perl/python like ones, C or C++, bash/tcsh/ksh/etc shell scripting, and sometimes Java) and use what ever one is appropiate for the job (I over generalized, I should say, that's what I do). You know pretty early on what language your program needs to be written in. The problem with just using C# is your still just using one language. You're not using the right tool all the time. It's the same reason I tend to disagree with Sun's attempt for Java to take over the world. You end up driving in a screw with a hammer.

  22. Re:COMPLETELY different by mhesseltine · · Score: 3, Insightful
    Operating systems are NOT, I repeat, NOT in the same boat as operating systems. OS/2 was a "better" windows, but windows already had taken hold of the market. Mono is just allowing current linux developers to take advantage of a very powerful and capable language specification which, BTW, will also allow many people to stop needing to use windows.

    First, I would say that Operating systems are in the same boat as operating systems. Maybe this was supposed to say "Operating systems aren't in the same boat as programming languages"?

    People aren't trying to build a better .NET; we're trying to build a .NET. Is there a .NET for linux?

    Are you implying we shouldn't use .NET on linux merely because .NET exists in windows? I think that's not a very good argument...

    I think the implication is that, if you trust Microsoft to set the standards, you'll spend all your time and effort playing catch-up to them when they change to a new standard.

    For an example of this, look at the Samba project. Yes it's been successful, but look at how difficult some of the advanced functionality was to get correct (Active Directory for starters)

    Mono will always be a second-class citizen in the .Net world, precisely because it isn't supported or backed by any truly large player that can hold some influence with Microsoft.

    --
    Overrated / Underrated : Moderation :: Anonymous Coward : Posting
  23. New Slogan: Catch Mono! by Captain+Irreverence · · Score: 4, Insightful

    Mono is a DotNet wannabe.
    DotNet, of course, is a Java wannabe.

    Why not just use Java? Oh, that's right:

    Microsoft - Duplicates anything they don't own and control

    Open Source Movement - Duplicates anything someone else owns and controls

  24. C not dead, .NET/C# not interesting by Anonymous Coward · · Score: 4, Insightful

    If I need to write a daemon that handles 250,000 hits/hr, I write it in C. Hands down, C is the only language I know where I can control memory and CPU usage. The only language where I can predict what will happen with some accuracy. If I write a program in Python or Java or whatever, it starts consuming RAM, it starts context switching at the wrong times, etc. On a recent Python project I had to actually go into the Python memory allocator (written in C) and do some hacking, because it didn't work right for my project. So obviously C is well and alive.

    If I need to write a quick script, but make sure it's clear enough to understand next week, I use Ruby. A lovely, well-designed language. Why bother with compiling and linking? Go dynamic.

    If I want to use an awesome development environment, I use Mac OS X. Aside: sometimes I wonder if people who rave about the latest scripting language or the latest Windows dev tool, have ever actually *used* NeXTSTEP/Cocoa! It's still light-years ahead of what most people use. Look how many examples in the Gang of Four patterns book come from NeXTSTEP!

    And, if I need to write a .NET program on Windows, I ... USE WINDOWS! Maybe I'll "play" with Mono, but at the end of the day the only reason I'd use Mono is for Windows interop. Not to replace Windows.

    C# is a nice improvement on Java. Which isn't hard to do.

    Like a lot of folks I look at Mono and I just don't get the point of it. It's Microsoft's technology, it's always going to be playing catch-up... to a mediocre environment.

    Give me .NET's dev tools and IDE for Ruby, then I'll get excited.

  25. Danger! by dmiller · · Score: 5, Insightful

    I respect Miguel, but I think he seriously underestimates the risk posed by MSFT's patents in this area. Quoth the article:

    Microsoft has granted a license to use this technology under so-called "reasonable and non-discriminatory" terms.

    "Reasonable and non-discriminatory" (RAND) does not imply "free". RAND was the proposed licensing requirement for W3C patents that was howled down by the community.

    Given that MSFT is willing to finance SCO to use arguably illegal tactics to destabilise and discredit free software, who would expect that they are above enforcing a small fee for every patent needed to implement Mono? They needn't do this immediately, in fact it is in their interest to wait until the technology is widely adopted, so they can slug everyone at the same time. Note that the usual legal defences against "submarine patents" won't work either if the terms have been disclosed to be RAND all along.

  26. Re:C is Dying? by Ironsides · · Score: 5, Insightful

    Obviously this guy has never been in an Engineering College lately. We are still learning C. Not C++, Not C#, Not Java, C. As in where you have to declare all your variables at the very beginning and can't declare them anywhere else. It's how we program microprocessors (among other things) in something other than assembly. And I highly doubt they will make a Java compiler for PICs, Motorolla HC11 and HC12's and various other devices any time soon. Besides, I here places are still looking for COBOL and FORTRAN programmers. Seeing as how those two are still here, C still has a long way to go before the white lillies come around.

    --
    Fly me to the moon Let me sing among those stars Let me see what spring is like On jupiter and mars
  27. What a load of rubbish by Chuck+Chunder · · Score: 4, Insightful
    Surprise, Microsoft releases .Net for Unix, and the entire effort is null and void. Your pride and joy is now a footnote, and a deprecated one at that.
    Sun produces Java for a whole bunch of platforms. So does IBM.
    Intel have a C compilers on a bunch of platforms. So does GNU (and Sun, and Microsoft).

    Software doesn't suddenly become useless simply because another vendor releases a competing implentation on the same platform. If MS do release a .NET implementation for Linux then mono will still be valuable. Licencing terms will obviously be one area they compete on. No doubt there will be others.
    --
    Boffoonery - downloadable Comedy Benefit for Bletchley Park
  28. Re:Miguel is dead! by orthogonal · · Score: 3, Insightful

    C is a language with the flexibility and speed of assembly combined with the ease of use of assembly.

    Of course, that's tongue in cheek, and yes, C's concept of arrays is perhaps too tied to a specific kind of machine architecture (and to BCPL's concept of arrays),

    but

    while C is far more portable and easier to code in than assembly, one great feature of C is that, if you know a particular machine's assembly language, you can look at your C code and pretty easily guess what assembly instructions will be generated from it.

    I recall when I was first learning C++ -- and no, I'm not a C++-hating C bigot -- one thing that annoyed me was the realization that what seemed a straightforward C++ function call -- or even more straightforward, an operation like i + j, when performed on class instances, could be much much more involved.

    (Consider the example I just gave, i + j: in C++ this could easily be i.operator+( j ), which might involve an implicit converting function or constructor to make j into the right type for i's operator+, and operator plus could easily be a virtual function that did some work and then called a super-function to do the rest of the work, and it wouldn't be a good operator+ unless it returned by value, which would mean that there'd be a (probably implicit, in the code) call to the constructor for whatever class i was an instance of. And we haven't even mentioned Handle-Body Idiom or Template Method Pattern or Pimpl Idiom or exception handling yet.)

    I soon got over my annoyance when I realized that it was precisely this ability to concentrate this much -- and much of it mostly automatic, as with converting functions of constructor calls -- into the semantics of addition, i + j, that makes C++ such a powerful tool in the hands of the right programmer.

    The trade-off, of course, is not being able to see the assembly language instructions in your mind anymore. The good programmer chooses his tools and his trade-offs.

    So to bring this back onto the topic of the post, I highly doubt C is dead or even dying or even a bit ruffled around the edges -- there are still, and for the foreseeable future, there will be, very very good reasons to use C -- it's the portable lingua franca of programming, and it's a remarkably clear language that allows one to concisely describe what otherwise would require lots more asembly instructions.

  29. Re:MonoDevelop IDE by k_head · · Score: 4, Insightful

    Why develop your own IDE? Why not write a plug in for eclipse?

    Bah, you probably wanted something written in C#. So much wasted effort.

    --
    The best way to support the US war effort is to continue buying American products.
  30. Re:Miguel is dead! by kdart · · Score: 3, Insightful

    Yep, I read your link. I have a philosophical difference, however. If someone has to know all that esoterica to be a "real" programmer than it's the language that is broken. That language just begs for problems (and bugs).

    --

    --
    The early bird catches the worm. The worm that sleeps late lives to see another day.
  31. Re:Miguel is dead! by Anonymous Coward · · Score: 5, Insightful

    A man is a good programmer or he is not a good programmer. He is not "a good C++ programmer". Whether he has learnt some esoteric nuance of a language does not make him a good or bad programmer. A particular language is just an interface to the act of programming, like a GUI is an interface to the act of using, and if it does something surprising, the problem is likely with the language, not the developer.

  32. Re:Miguel is dead! by Jordy · · Score: 4, Insightful

    When over 95% of "C++ programmers" that I interview can't even answer this: straightforward question about virtual methods, I see no hope for the language. It seems most people who claim to be C++ programmers just say that because they use a C++ compiler and stick their functions in objects.

    I'd like to point out that there is absolutely nothing wrong with writing "C with Classes." It makes a whole lot more sense than trying to fake it with structs and function pointers with only a minimal loss of efficiency. Certainly replacing all char pointers with strings would make up for the inefficiency with the huge amount of time saved debugging. Just because operator overloading, templates, references, etc. exist doesn't mean you have to use them. I mean, no one puts a gun to your head and forces you to use Swing in Java just because it is standard.

    Second, that question should have been rather simple to answer for anyone who was aware that the std::complex template has a copy constructor with an implicit conversion. Not everyone knows that simply because complex isn't exactly the most widely used thing in the world. If you are going to ask that quesiton, I'd recommend defining a template in the code to make it obvious.

    The language features in C++ can be abused, but a huge number of errors I see are from misusing APIs and none of the high level languages like Java are going to make sure you are paying attention to what you are doing.

    --
    The world is neither black nor white nor good nor evil, only many shades of CowboyNeal.
  33. Re:Miguel is dead! by Pete · · Score: 5, Insightful
    ron_ivi:
    When over 95% of "C++ programmers" that I interview can't even answer this: straightforward question about virtual methods, I see no hope for the language.

    Seriously dude, that is most definitely not a straightforward question. It's carefully designed to test your understanding of some of the subtle tricks and traps of C++. And one of the "tricks" it uses to mislead you has nothing to do with inheritance, rather with implicit casting.

    I must admit I got tripped up on it though, mainly because I'd forgotten the distinction between hiding and overriding. The question is nasty, ugly, and was intended to be as confusing and tricky as possible... and any programmer that writes code like that (especially something involving changing the default value of a parameter for an overriden method) ought to be shot.

    BTW, if you're asking questions out of GOTW as interview questions, I can only say that that's pretty nasty - except perhaps as a final round question for some of the really cocky smart-arse types :-). Or if you're looking for a seriously hard-core C++ expert, in which case you'd probably expect him/her to have read all of GOTW and Sutter's books and know all the answers off by heart anyway.

    It seems most people who claim to be C++ programmers just say that because they use a C++ compiler and stick their functions in objects.

    There's certainly a depressing number of such people about - though nowadays they're mainly moving into Java, a language better suited to their limitati^Wcapabilities. And I say "Hooray!" to that :).

    Pete (who has for the last two months been maintaining/debugging/adding features to a 1998-era MSVC6 project, written by a guy who really had no idea about C++. Sigh.)
  34. and of course by pyrrho · · Score: 3, Insightful

    half that esoterica wasn't even implimented while C++ became popular.

    Because functions declared in structures is 90% of what C programmers wanted out of it at the time. Having constructors and destructors was also quite nice. And that is enough to use C++ right there.

    You are not supposed to use all the esoterica.

    --

    -pyrrho

  35. Re:Miguel is dead! by kahei · · Score: 4, Insightful


    I know a dozen other people have probably already said this, but if you think that question measures whether someone is an effective C++ programmer then the problem is with you.

    It's a neat trick and the last bit (where default params are resolved based on static type while method calls are resolved based on dynamic type) fooled me. But it has nothing whatever to do with a software engineer's job, unless that job is writing C++ compilers.

    Put away your book of trick questions and hire a C++ programmer who understands patterns, algorithms, project management, requirements, and important standards and protocols.

    --
    Whence? Hence. Whither? Thither.
  36. Re:Miguel is dead! by RisingSon · · Score: 4, Insightful
    Interesting points.

    That link is a good puzzle but I don't know how well its going to help you find good developers in an interview. I remember I was about a year out of college when I discovered such details of C++. I was like, "WTF? I'mn not overloading that one...why am I here?". About 5 minutes and 1 small program resembling the one in your link I had my answer and moved on.

    So was it that one year of experience you would be seeking? Or would it be my problem solving skills that when my code doesn't work I'll find the answer quickly and consistently? When I interview, I try and discover one's problem solving abilities, not one's specific knowledge. It obviously all depends on what role you need filled.

    A C/Java world with no C++? Most of the software I've written in the past few years has been C++ with lots of C influence. Lots of functions, few objects. I probably have more structs in cvs than classes. Its really nice to have my function/struct style code and my message/class style code coexist freely.

    For example, I have a system I wrote that the backend database is all in shared memory. I played with classes in shmem and I put some templates there, too, with the Allocator. In the end, I chose structs because I was able to exploit their fixed size to make things quite speedy.

    But now I have a Phd physicist that needs to do some serious matlab-style maxtrix maninpulation of my struct-based data. And he can 'kind-of' code. It was nice wrapping up access with some matrix classes so it all looked more like matlab to him.

    I think there is still value in having all that in one language, even though it can make it an ugly one.