Thread: C++/CLI arrogance

  1. #31
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    Quote Originally Posted by Bubba
    Now they tout this as the 'only' way to program so we should all drop traditional C++ to use CLI. In fact if we don't, we will be left behind.
    But see, that's not true. It'll be the 'only' way to create windows, yes. But the Win32 API was the 'only way' before. They provided C++ in exactly the form it was in before. The parts that talk to windows are the only thing you need do differently. Not much differen than changing the API IMO.

    Quote Originally Posted by Bubba
    It would be no different than any of us tearing apart the API, copying most of it, altering it here and there to do what we want, and then touting it as a revolutionary technology that we should all use. We'd be in court tomorrow I guarantee it.
    WINE anyone?
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  2. #32
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    I don't recall being pressured to install wine when I installed linux, nor do I remember wine being considered revolutionary. I also don't remember wine competing with anyone or shielding its manifestation with technical jibberish. I do remember reading "Wine is an Open Source implementation of the Windows API on top of X and Unix."

  3. #33
    User
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    499
    Quote Originally Posted by valis
    I don't recall being pressured to install wine when I installed linux, nor do I remember wine being considered revolutionary. I also don't remember wine competing with anyone or shielding its manifestation with technical jibberish. I do remember reading "Wine is an Open Source implementation of the Windows API on top of X and Unix."
    I remember reading, "Wine Is Not An Emulator".
    It's still a cool project, especially that it can run MS Office.

  4. #34

    Join Date
    May 2005
    Posts
    1,042
    A link to ponder and lead to more links. A quick google of CLI vs C++ would probably yield hours of reading.

    http://www.sysinternals.com/blog/200...im-scared.html
    That is an interesting article and seems to go hand-in-hand with Bubba's quips about the new managed code being particularly inefficient. For anybody that has not looked briefly at the article, the author displays the performance of notepad implemented in both managed and 'native' code, the managed leaving a substantially larger memory footprint and using 'significantly' more processor time.

    Bubba and I are both into interactive programming, where getting a particular complex equation to work is the bane of our existence, and everything else just seems like a ........ing contest...Well, that attitude is a little too narrow, I think all software revolutions are interesting and can ultimately contribute something positive, I just have a skeptical attitude, in general.

    Quote Originally Posted by fyb
    edit: it's partially wrong. for the moment, .NET does use the Win32 API. They will be moving that over time. Win32 will become a wrapper, supported for backward compatibility.
    ...
    But see, that's not true. It'll be the 'only' way to create windows, yes. But the Win32 API was the 'only way' before. They provided C++ in exactly the form it was in before. The parts that talk to windows are the only thing you need do differently. Not much differen than changing the API IMO.
    Anything I say that sounds like I'm twisting the facts is due to an honest lack of understanding. With that, I think the whole .NET/managed code has a lot of benefits for people that want to write the same types of applications they'd write in Visual Basic...applications that do not necessarily require the highest end of the performance spectrum, look pretty, and are fundamentally quick and easy to create.
    I'm afraid, however, that if win32 is to become a 'wrapper' to .NET (did I understand your above comment correctly?) that any interaction with the OS will yield increased performance penalties.


    The relic tools that I use work and do everything that I want (Microsoft visual C++ 6 baby). I use just enough win32 in order to get by for my computer game, which requires basic menus to create settings initialization (pure win32, no MFC or the like), mouse and keyboard updates (again, I directly ask the OS the current state of each of these, no buffered input or DirectX, and input is not handled in the wndproc). I also manually query the network to send high scores (but I have not attempted to implement interactive multiplayer). How worried should somebody in my shoes be about this overall trend? As of right now, I don't particularly need to care because I can interact with the OS in the 'old school' manner, I'm just afraid about that option not being available in the future.

    I sincerely hope that my fears are unfounded.
    Last edited by BobMcGee123; 07-27-2006 at 09:28 PM.
    I'm not immature, I'm refined in the opposite direction.

  5. #35
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Bob you hit the nail on the head. My fear is that MS is going to force all of us to use .NET for everything we do.

    By far, and according to articles, books, white papers, etc, un-managed code well-written, well-behaved code runs better, has a smaller memory footprint, and is more efficient.
    Cleaning up objects at the point they are no longer needed is much better for me. I'm not too fond of Windows doing that for me. You guys don't seem to understand that CLI/CLR is not just an option, it will be Windows if MS has their way.

    I actually see arguments for CLI like this:

    'Besides the cost of memory is so low now that we shouldn't worry about the difference.'
    'It will make C++ easier since there will be no pointer issues'
    So I guess since CPU's are a dime a dozen now I can just use whatever crappy algo I want and if the end user cannot use my program, he can go purchase a new CPU.

    I don't think accepting this for the sake of making it easier holds any water. Why does everything have to be easier? Usually in the process of making things easier, we actually make them harder and more complex.

    We will see where this goes in the future. If it flops, MS will have a lot of 'words' to eat. If it doesn't, then I hope those 10 GHz computers are close to becoming standard.

    The CLI and the CLR are the virtual machine, runtime system, and library collection. They are one thing.

    C++/CLI, C#, VB.Net, J#, JScript.Net and all the many others are programming languages or specific implementations of programming language that make use of the CLI. They typically output CIL bytecode, they make use of the CLI garbage collector, they adhere to the CLI type system (mostly).
    Except that this thread is about C++/CLI which is the C++ side of the CLI/CLR. And even though CLI and CLR have cool new names, they are essentially a bastardized Java VM. The debate here is that CLI/CLR is being touted as the only way to program in Windows based on my book - in essence, MS is attempting to mold C++ into a language that more appropriately fits with their API. Changing a language to suit an API to me is arrogant.
    Last edited by VirtualAce; 07-27-2006 at 11:05 PM.

  6. #36
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Stroustrup provides in his FAQ a somewhat detailed opinion on C++/CLI. He sees the advantages of having such a language, and goes on to provide us a sane article on it balancing the advantages with what he considers a bad implementation.

    Unfortunately, the last two paragraphs seem to not hold much water as Microsoft is moving pro-actively against ISO C++. It's the price of naivety. Something I think always characterized him.


    No matter what, I hope you find something to hold on, Bubba. And in the end you can take some fun out of C++/CLI. Because otherwise it will be hard for you to choose this tool as a career knowing beforehand you don't like to use it. I would hate to see your day-to-day at the office. Certainly not as much as you would.

    The good news is, the general opinion is that Microsoft can't get rid of unmanaged code. Its just not possible due to legacy code and performance issues on resource demanding applications. To name two.

    So you will still have for a long time a wealthy and healthy ISO C++ job industry.
    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.

  7. #37
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    I think its important to understand that if you wrote a dll in VC++ 6 or even gcc, you could use it in a .NET app through C++/CLI. The performance hit that we all seem to be talking about can't possibly exist in that case. The argument that its all managed and slow can't possibly be true when you do that. So I think a lot of the fear here is unfounded is what I've been saying. You can still create pure C++ stuff and I don't see MS as moving away from that.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  8. #38
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    I run across language nazis all the time. Heck I used to be one. But a PROGRAMMER is someone who can take a given language, use it, and shut up about how their language (or even specification) is better.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  9. #39
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by FillYourBrain
    I run across language nazis all the time. Heck I used to be one. But a PROGRAMMER is someone who can take a given language, use it, and shut up about how their language (or even specification) is better.
    I couldn't disagree more. I know where you are comming from. However, you always draw inevitable comparisons. I think I can honestly say that C is a better programming language than VB for the scientific modelling or data crushing. I can say that C++ is a better language than C. And I can say that C is a better language than C++. And I will be right on all accounts. It all depends on what's the subject of my comparison.

    But I also think that I can generally say that one language is better than another. Certainly most things are better than Cobol. And you will also agree that it's hard to beat C and C++.

    The almost religious faith to a programming language is definitely not a good thing. That one may dislike this attitude and publicly advocate against it, is certainly a good thing. But on the other end of the spectrum there's excessive relativeness. And that serves no one either.

    I think moderation is a necessity also for those trying to protect it.
    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.

  10. #40
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    "better" is subjective

    Quote Originally Posted by Mario F.
    I think moderation is a necessity also for those trying to protect it.
    It's basically this that I'm advocating actually. The hatred of C++/CLI comes from religious ferver of the C++ purist. Not to mention inborn hatred of microsoft

    edit: spelling
    Last edited by FillYourBrain; 07-28-2006 at 06:30 AM.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  11. #41
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    Better is dynamic, depending on what you wish to accomplish. This thread comes to mind from reading the above.


    >> The hatred of C++/CLI comes from religeous ferver of the C++ purist.
    I was afraid to say that ... but I couldn't agree more!
    Last edited by twomers; 07-28-2006 at 06:06 AM.

  12. #42
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,401
    Quote Originally Posted by FillYourBrain
    It's basically this that I'm advocating actually. The hatred of C++/CLI comes from religious ferver of the C++ purist. Not to mention inborn hatred of microsoft
    I agree 100%. However, you have to admit that Managed C++ in its first incarnation was awful. That, more than anything else, probably turned me off to the language.
    Quote Originally Posted by FillYourBrain
    I think its important to understand that if you wrote a dll in VC++ 6 or even gcc, you could use it in a .NET app through C++/CLI. The performance hit that we all seem to be talking about can't possibly exist in that case. The argument that its all managed and slow can't possibly be true when you do that.
    Unfortunately, this isn't the case. To talk to unmanaged assemblies, you're basically PInvoking, which is a significant performance hit.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  13. #43
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    but a mixed assembly such as is created by C++/CLI talking to a dll doesn't have to do pinvoke as I understand it. Could be wrong I suppose.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  14. #44
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by FillYourBrain
    It's basically this that I'm advocating actually. The hatred of C++/CLI comes from religious ferver of the C++ purist. Not to mention inborn hatred of microsoft
    I really feel I need to dispel this. Maybe I'm the only one?...

    I don't see hatred being the exchange currency on the thread, Fill. Some passionate arguments? Probably, yes. But that is healthy. I would hate to think we all behaved like perfect gentleman.

    I think very valid points have been made here for and against C++/CLI. Unfortunately the arguments for CLI seem to be almost all set in some time in the future.

    But c'mon, I think one person is entitled to dislike something and even hate something without being immediately tagged as language nazi or microsoft hater. How about we move on from this line of reasoning?

    but a mixed assembly such as is created by C++/CLI talking to a dll doesn't have to do pinvoke as I understand it. Could be wrong I suppose.
    This has been discussed a few posts above. There's a performance hit.
    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.

  15. #45
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,401
    Quote Originally Posted by Mario F.
    I think very valid points have been made here for and against C++/CLI. Unfortunately the arguments for CLI seem to be almost all set in some time in the future.
    Really? After reading and re-reading this thread, here are the arguments that I could find against C++/CLI.
    • The 'unsafe' keyword is emotionally charged.
    • C++/CLI looks like MS's push to move C++ programmers
    • C++/CLI is slow and bloated
    • MS deprecated the standard library while providing C++/CLI
    • MS might replace the WinAPI with a .Net interface
    Out of all of those, only the third one is objective and measurable. The first one is an exercise in naming a keyword (they could have used 'unmanaged', but we all know programmers like short keywords). The second one simply says that C++/CLI is tied to MS; whether this is a point for or against depends on the programmer. The fourth one can be alleviated with a simple define in your C++ projects. The fifth one is set in the future. Please add any others I might have missed.

    The only major disagreement I have with C++/CLI is that it's marketed as an extension of ISO C++ when it's obviously a different language. However, that's still not a valid point against the use of a language. Some valid points might be that C++/CLI doesn't support local classes, bitfields, or multiple inheritance, or that generics in C++/CLI can't match the power of templates in C++. Those look like some valid points to not use a language.
    Last edited by pianorain; 07-28-2006 at 08:18 AM.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

Popular pages Recent additions subscribe to a feed