Like Tree3Likes

Vs c++

This is a discussion on Vs c++ within the Windows Programming forums, part of the Platform Specific Boards category; Originally Posted by Elysia And that is the point. We must create something complex and tame it in order to ...

  1. #31
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    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.
    But are we the ones who should be concerned about ease?
    Again... is it not our job to do the complex work of making it easy for the end user?

    You can't escape reality...
    LOL... Not even in C++ with a gazillion bytes of framework...

  2. #32
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,428
    Quote Originally Posted by CommonTater View Post
    But are we the ones who should be concerned about ease?
    Again... is it not our job to do the complex work of making it easy for the end user?
    As I said before, the more complexity you put in your application, the more bugs there will be. Yes, it is our job to abstract it from the user. But it is also our job to make the user happy.
    If there are already tools available, why not use them?

    If you had a choice between using a screwdriver and an automated electric screwdriver, which would you use? Clearly, the electric one would allow us to get the job done faster, and with more accuracy.
    Salem likes this.
    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. #33
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    If there are already tools available, why not use them?
    One can make the same argument about WinAPI...
    If the OS already provides you the tools you need, why not use them?

    If you had a choice between using a screwdriver and an automated electric screwdriver, which would you use? Clearly, the electric one would allow us to get the job done faster, and with more accuracy.
    Given the number of times I've pulled out my trusty Philips screwdriver and tightened every bolt and screw installed with automated screwdrivers on Chinese production lines... I'm having a very hard time answering that one... (Seriously... it seems that everything I work on these days is made in China and every last screw is undertightened.)

  4. #34
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,428
    Quote Originally Posted by CommonTater View Post
    One can make the same argument about WinAPI...
    If the OS already provides you the tools you need, why not use them?
    Because it's inferior.
    "Hey, look, it's cold outside! Let's store our food outside instead of the freezer!"
    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. #35
    Registered User
    Join Date
    Aug 2003
    Posts
    1,198
    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....
    It is a wrapper yes, but who says something like that couldn't have been implemented instead of the way winapi is currently implemented? That is the huge difference. Winapi is probably a wrapper over kernel-code anyway so the whole wrapper point really doesn't stick. Especially combined with my second point below.

    Speed isn't really an issue either, since alot of the time spent in a win32 application is idling just waiting for messages anyway.

    Edit: I see alot of my thoughts have already been conveyed by Elysia after my initial post.

    Second edit: I can't really see how one can argue that a more complex library should be used when there are other better designed libraries providing more functionality in a form that is much easier for the programmer to handle and use. "The best tool for the job" is an expression often used by programmers, and it applies to libraries aswell. In todays day and age WinAPI is losing out to other libraries that are better designed for todays usage, both in easy-to-use when doing the initial programming but also in maintaining a program.

    A huge part of a programs life-span is maintaining it and must be taken in account when making decisions. I do not and never will beleive a pure WinAPI application is easier to both program the initial application and to maintain, than a program written in a more modern library.
    Last edited by Shakti; 03-13-2011 at 09:29 AM.

  6. #36
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    Because it's inferior.
    Consider that most of your frameworks --wrappers, etc.-- actually call WinAPI functions... If the WinAPI is so inferior, how can your frameworks possibly be any better?

    A house is no better than the wood it's made from...

  7. #37
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,428
    You misunderstand what I mean by inferior. It isn't that WinAPI produces inferior results--it does not. It is inferior in such a way that it is difficult to use to attain the correct results. The libraries simply the getting results right part.
    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. #38
    Registered User
    Join Date
    Aug 2003
    Posts
    1,198
    Quote Originally Posted by CommonTater View Post
    Consider that most of your frameworks --wrappers, etc.-- actually call WinAPI functions... If the WinAPI is so inferior, how can your frameworks possibly be any better?

    A house is no better than the wood it's made from...
    Because the wrapper exposes the relevant parts in a more programming-friendly environment that allows the programmer to use the underlying library in an easier way to produce more robust application less prone to bugs. An open-source library (mentioning open-source because many of the biggest GUI libraries are opensource) is probably peer-reviewed many times harder than any code written by a programmer at a company.

    With your logic C isn't really useful since its just a "wrapper" for assembly, and assembly is just a wrapper for binary code anyway so by your logic binary code is the way to go when programming.

    A house is no better than the wood it's made from, but a house with a crappy blueprint and layout is still crap, no matter how good the wood is.

  9. #39
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Shakti View Post
    It is a wrapper yes, but who says something like that couldn't have been implemented instead of the way winapi is currently implemented? That is the huge difference. Winapi is probably a wrapper over kernel-code anyway so the whole wrapper point really doesn't stick. Especially combined with my second point below.
    Actually WinAPI is a collection of DLLs. Some of the functions will, indeed be kernel calls, but most are just library functions... much like your wrappers.

    I can't really see how one can argue that a more complex library should be used when there are other better designed libraries providing more functionality in a form that is much easier for the programmer to handle and use. "The best tool for the job" is an expression often used by programmers, and it applies to libraries aswell. In todays day and age WinAPI is losing out to other libraries that are better designed for todays usage, both in easy-to-use when doing the initial programming but also in maintaining a program.
    I'm not saying you don't have a point... you do.

    However; --and this is where I get a little giggle every time this comes up-- WinAPI is, itself, merely a set of libraries.... In effect you're arguing "My toy's better than your toy" and I think we both know the obvious retort to that... "Is NOT"... "Is SO"...

    A huge part of a programs life-span is maintaining it and must be taken in account when making decisions. I do not and never will beleive a pure WinAPI application is easier to both program the initial application and to maintain, than a program written in a more modern library.
    Y'know what, I can make the same claim in reverse... But in reality it's a question of familiarity. I've seen WinAPI programmers who look at third party libraries in disbelief... and next to him is a library fan looking at WinAPI in disbelief... Both are overwhelmed by what they are not familiar with...

    Quote Originally Posted by Elysia View Post
    You misunderstand what I mean by inferior. It isn't that WinAPI produces inferior results--it does not. It is inferior in such a way that it is difficult to use to attain the correct results. The libraries simply the getting results right part.
    Now that I can agree with. The libraries do simplify your job somewhat.

    But you started off claiming that WinAPI itself introduced bugs into programs... Apparently not thinking what lies underneath your wrapper libraries...
    Last edited by CommonTater; 03-13-2011 at 09:55 AM.

  10. #40
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,428
    Quote Originally Posted by CommonTater View Post
    Now that I can agree with. The libraries do simplify your job somewhat.

    But you started off claiming that WinAPI itself introduced bugs into programs... Apparently not thinking what lies underneath your wrapper libraries...
    Yes, and I still claim that using WinAPI in its raw form introduces bugs into programs. More so than using 3rd party libraries.
    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. #41
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Shakti View Post
    Because the wrapper exposes the relevant parts in a more programming-friendly environment that allows the programmer to use the underlying library in an easier way to produce more robust application less prone to bugs. An open-source library (mentioning open-source because many of the biggest GUI libraries are opensource) is probably peer-reviewed many times harder than any code written by a programmer at a company.
    Take my word for this... You do not want to get me started on Open Source projects... Let me just remind you of the old saw: "Too many cooks spoil the broth".

    With your logic C isn't really useful since its just a "wrapper" for assembly, and assembly is just a wrapper for binary code anyway so by your logic binary code is the way to go when programming.

    A house is no better than the wood it's made from, but a house with a crappy blueprint and layout is still crap, no matter how good the wood is.
    Don't try so hard... You're point is heard... I disagree but I have definately heard you.

    Quote Originally Posted by Elysia View Post
    Yes, and I still claim that using WinAPI in its raw form introduces bugs into programs. More so than using 3rd party libraries.
    Shall I repeat my previous point about where bugs come from?

  12. #42
    Registered User
    Join Date
    Aug 2003
    Posts
    1,198
    Quote Originally Posted by CommonTater View Post
    Actually WinAPI is a collection of DLLs. Some of the functions will, indeed be kernel calls, but most are just library functions... much like your wrappers.



    I'm not saying you don't have a point... you do.

    However; --and this is where I get a little giggle every time this comes up-- WinAPI is, itself, merely a set of libraries.... In effect you're arguing "My toy's better than your toy" and I think we both know the obvious retort to that... "Is NOT"... "Is SO"...
    Yes, it is hard to argue in any other way really. But I think you will find more programmers switching from WinAPI to some other library that wraps it than you will find programmers switching from a wrapping library to WinAPI. I know it's a crappy argument really but in my mind this says something about WinAPI in comparison with the other libraries.

    Y'know what, I can make the same claim in reverse... But in reality it's a question of familiarity. I've seen WinAPI programmers who look at third party libraries in disbelief... and next to him is a library fan looking at WinAPI in disbelief... Both are overwhelmed by what they are not familiar with...
    The difference I think is that if they were both to use the other (library fan use WinAPI and the winapi fan use the library) for say a week I think in many cases the library fan would go back to the library and the WinAPI fan would probably also concede that the library is easier (better).

    Humans like to do things the easy way and once you get somebody to try the easy way its easy to stick with it. The reverse can not be said.

  13. #43
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,428
    Quote Originally Posted by CommonTater View Post
    Shall I repeat my previous point about where bugs come from?
    No, they are not logical.
    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.

  14. #44
    Registered User
    Join Date
    Aug 2003
    Posts
    1,198
    Quote Originally Posted by CommonTater View Post
    Take my word for this... You do not want to get me started on Open Source projects... Let me just remind you of the old saw: "Too many cooks spoil the broth".
    Yes I think open-source has problems, too many cooks can definately be one of them. That doesn't mean there are some seriously peer-reviewed open source libraries that are better than the underlying library they wrap.


    Don't try so hard... You're point is heard... I disagree but I have definately heard you.
    Not trying hard at all really.

    Shall I repeat my previous point about where bugs come from?
    Bad programmers produce bugs yes, but is that a reason for not making the life as easy as possible, and give and let programmers use every tool available to produce bug-free code?

    Just because programmers create the bugs doesn't mean we shouldn't provide any tool available to prevent that. And a library that is less prone to produce buggy code is one of those tools.

  15. #45
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Shakti View Post
    Yes, it is hard to argue in any other way really. But I think you will find more programmers switching from WinAPI to some other library that wraps it than you will find programmers switching from a wrapping library to WinAPI. I know it's a crappy argument really but in my mind this says something about WinAPI in comparison with the other libraries.
    It also says quite a bit about programmers, too...

    Nobody's going to blame them for taking the path of least resistence, it's done all the time. But there is no denying the impact on the craft... A lot of "dumbing down" as programmers increasingly have less and less understanding of the systems they motivate...

    In the mid-1980s when I began to incorporate computers into my professional life (instead of the hobby they'd been until then) the big grumble about Programmers was "They just don't seem to understand the hardware"

    Now it's fast becomming: "They just don't seem to understand the software..."

Page 3 of 4 FirstFirst 1234 LastLast
Popular pages Recent additions subscribe to a feed

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