Thread: Vs c++

  1. #16
    Registered User
    Join Date
    Mar 2011
    Posts
    53
    Quote Originally Posted by Elysia View Post
    A prime example are handles. They must be closed properly. So you must call CloseHadle or relevant functions. But what if you forget? C++ can take care of that for you. But you'd have to write wrappers for that yourself. Or use a library which handles it for you.
    You're saying it yourself, you find it too complex, because you are a c++ programmer.
    If handles are that hard for you, maybe you should go back to VB.

    What i am trying to say is programming in other libraries are like sewing with a hand made of stone. For example Win32 allows you to close handles whenever you want, and the way you want, not the way your library wants.

    So, complexity is a price which HAS to be payed by any programmer in order to achieve flexibility.

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by new_in_c++ View Post
    You're saying it yourself, you find it too complex, because you are a c++ programmer.
    If handles are that hard for you, maybe you should go back to VB.
    Yes, yes, you may go back to VB since you desire it so.

    What i am trying to say is programming in other libraries are like sewing with a hand made of stone. For example Win32 allows you to close handles whenever you want, and the way you want, not the way your library wants.
    And it creates bugs. Bugs which you can live without unless you really need the flexibility which only in about 0.000001% of the cases.

    So, complexity is a price which HAS to be payed by any programmer in order to achieve flexibility.
    No one argued that.
    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. #18
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by new_in_c++ View Post
    You know, the capabilities of c++ can have a bad effect on people. For example, Elysia, you can't understand win32, you find it too complex. Just because win32 was written in c, you are closed to new ideas about it. So i'm starting to think that c++ takes the ability of complex thinking from you.

    And there is no need to insult programmers working on a specific language. C++ might be better, but C alone does the job, too.
    Actually I think I agree with Elysia on one point... They are different mindsets. But I seriously doubt one is better or more valuable than the other. I would think it a mistake to apply any scale of worth...

    Plus, knowing Elysia a bit... I'm guessing she's at least moderately familiar with WinAPI...

    That said... I am no fan of RAD systems (Rapid Application Design). Delphi, which was really just a mass of units for Pascal used to make me want to hurl after working in Pascal for nearly a decade before... The language suddenly went from small, efficient and fast, to massive, cumbersome and prone to untraceable errors. And it didn't get any better with age.

    I will agree with you that RAD systems often can and do have negative impacts upon a programmer's skillset... we all tend to get lazy and RAD is just an open invitation.

  4. #19
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    For that matter, new_in_c++, I am wondering if you are aware of what the word complex means. Have you worked on libraries in C++? Of big templates systems? Meta template programming? I dare say it's pretty complex. And yes, I have done it.
    And you know algorithms? They can be pretty complicated, too. Yes, and I have written lots of them.
    I don't tend to shy away from complexity. I tend to embrace it.
    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. #20
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    It has also been shown that you can write a full-fledged GUI library in pure C that isn't nearly as complex as win32 API. Just look at GTK+ for an example. In my view Win32 API is horribly bloated and anything that abstracts it away is better really.

  6. #21
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    I am well versed in Win32. To a degree anyway. It's horrible. It's complex, and it's disgusting. Not only because it's pure C, but because of its complexity.
    This isn't about C or C++: if you use C, then go ahead, use the API. It might not be too horrendous. But to a C++ programmer, the API is horrendous. It will create bugs, and it will create substandard code for the language. And that is because C++ has tools which C does not, and the API can obviously not use those.
    Elysia, me amiga... APIs do not create bugs... Programmers create bugs. It's a matter of attending to details...

    A prime example are handles. They must be closed properly. So you must call CloseHadle or relevant functions. But what if you forget?
    Then you find and fix your error.


    Yes, the end user is what matters. And how much longer development time and bugs will you create because you use the API instead of a framework that handles most of the work for you?

    The point of wrappers and frameworks is to reduce complexity. It will create an overhead, yes. But it will also reduce development time to achieve something and because it reduces complexity, it reduces the chance for bugs, which means less buggy software and a shorter development cycle.
    So, to be clear... your logic is that you are reducing complexity by introducing complexity?

  7. #22
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by CommonTater View Post
    Elysia, me amiga... APIs do not create bugs... Programmers create bugs. It's a matter of attending to details...
    So how do you minimize the bugs the programmer create?

    Then you find and fix your error.
    No, you don't produce them in the first place.

    So, to be clear... your logic is that you are reducing complexity by introducing complexity?
    Depends on what you view as complexity. If 3rd party libraries are complexity, then yes.
    If not, then...
    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. #23
    Registered User
    Join Date
    Mar 2011
    Posts
    53
    Since no one is giving any effort to answer the main question i'm continuing to give tutorial links:

    C++ Win32 API Tutorial | Inferno Development
    This is a short article written on the basics of win32.

    Free programming ebooks - java ebooks - linux ebooks - c, c++ ebooks
    I think you can find some ebooks on the topic from this site.

    Visual Basic 2008 Tutorial
    And this one is for you Elysia Just kidding. I know a C++ enthusiast like you won't try another language easily.

  9. #24
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Shakti View Post
    It has also been shown that you can write a full-fledged GUI library in pure C that isn't nearly as complex as win32 API. Just look at GTK+ for an example. In my view Win32 API is horribly bloated and anything that abstracts it away is better really.
    Ummm... no offense but you may want to give that some thought... GTK+ and other such toolkit libraries are, for the most part wrappers applied over and around WinAPI functions. By their very nature that will be both bigger and slower than direct WinAPI calls...

    Quote Originally Posted by Elysia View Post
    So how do you minimize the bugs the programmer create?
    By becomming a better programmer.

    It's about improving your craft, not avoiding it's difficulties.
    Last edited by CommonTater; 03-13-2011 at 08:29 AM.

  10. #25
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by CommonTater View Post
    Ummm... no offense but you may want to give that some thought... GTK+ and other such toolkit libraries are, for the most part wrappers applied over and around WinAPI functions. By their very nature that will be both bigger and slower than direct WinAPI calls...
    That is not the point.
    The point is that it reduces complexity.

    By becomming a better programmer.

    It's about improving your craft, not avoiding it's difficulties.
    That is only part of the equation. Even the best of programmers cannot avoid all pitfalls and bugs.
    And btw, it's "its" in this case, not "it's".
    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.

  11. #26
    Registered User
    Join Date
    Mar 2011
    Posts
    53
    Quote Originally Posted by Elysia View Post
    For that matter, new_in_c++, I am wondering if you are aware of what the word complex means. Have you worked on libraries in C++? Of big templates systems? Meta template programming? I dare say it's pretty complex. And yes, I have done it.
    And you know algorithms? They can be pretty complicated, too. Yes, and I have written lots of them.
    I don't tend to shy away from complexity. I tend to embrace it.
    Then i'm surprised to hear you hate win32. An "ambitious" programmer like you should have "embraced" that too. Instead, you are making "newbie" programmers run away from win32, telling them how disgusting win32 is.

  12. #27
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    It is, because in the end, the reason I embrace complexity is to reduce it. A library must be flexible. But it must also be easy to use. Win32 is not. It's a failure.
    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.

  13. #28
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    That is not the point.
    The point is that it reduces complexity.
    See, that's where we are arguing a crossed purposes... At some point all these extensions, wrappers, frameworks and libraries have to go back to the OS... You are effectively speaking to the OS through a translator. Not only is this more complex, I should think it would be far more error prone. That the wrapper may fix its own mess, doesn't mean it's less complex or more efficient. It really only means it's easier for the programmer.

    That is only part of the equation. Even the best of programmers cannot avoid all pitfalls and bugs.
    Now, on THAT we are definately going to disagree.



    And btw, it's "its" in this case, not "it's".
    Sigh... I always get that wrong...

  14. #29
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by CommonTater View Post
    See, that's where we are arguing a crossed purposes... At some point all these extensions, wrappers, frameworks and libraries have to go back to the OS... You are effectively speaking to the OS through a translator. Not only is this more complex, I should think it would be far more error prone. That the wrapper may fix its own mess, doesn't mean it's less complex or more efficient. It really only means it's easier for the programmer.
    And that is the point. We must create something complex and tame it in order to use it easily. Such is the way for all things.
    Computers... very complex beasts. Very hard to make. Yet, once made, so easy to use. And so valuable a tool.

    Now, on THAT we are definately going to disagree.
    You can't escape reality...

    Sigh... I always get that wrong...
    Think of it this way:
    "it's" is a shortcut for "it is". So repeat the sentence to yourself. Does it make sense for it to be spelled with "it is" or "its"? For example,
    This is a pen. Its color is red.
    This is a pen. It is color is red.
    Which one makes sense?
    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. #30
    Registered User
    Join Date
    Mar 2011
    Posts
    53
    Fighting is meaningless at the moment, as no body is going to change his/her mind.

Popular pages Recent additions subscribe to a feed