Low-Level and High-level ::: C-style And C++ Style

This is a discussion on Low-Level and High-level ::: C-style And C++ Style within the C++ Programming forums, part of the General Programming Boards category; Hi. I am to the point where I can solve a problem using C++ "low-level" (i.e dynamic memory allocation) and ...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348

    Low-Level and High-level ::: C-style And C++ Style

    Hi.

    I am to the point where I can solve a problem using C++ "low-level" (i.e dynamic memory allocation) and "high-level" (i.e. using the string and STL container). Experienced programmers, even Stroustrup, recommend using library tools like string when possible because them are optimized.

    First, what is the point of programming if almost everything is done for you and all you have to do is put the pieces together?

    Under what circumstances do you prefer low-level C++ over high-level C++, and vic versa?

    Hey, do not get me wrong. Based on my experience, C++ library tools (strings and STL) are unparalleled. I find using C++ library tools speeds up my programs, and they serve as the "missing" pieces to solutions to various programs especially when dealing with istream and ostream.

    I fear that relying too much on C++ standard library will cause the programmer to lose sight of the big picture and begin to forget the low-level stuff. Does that happen to you? Thus, I try to implement C-Style when possible.

    Kuphryn

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Low-level should be used until one understands how it all works, I don't recommend using the STL until you know how to write a working version of the class you intend to use.

    Low-level is also preferable when you need full customizability, the STL is generic and can be used most of the time, but sometimes you need something that the STL can't do and you have to know how to write it yourself.

    High-level is preferable once you know how it works because it speeds up the program and the production. Then there's the added benefit of not having to debug a prewritten and pretested class.

    Conclusion: Learn to write low-level first, then use high-level unless low-level is needed.

    -Prelude
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    I agree.

    Kuphryn

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