Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 31
  1. #16
    殺す必要がある唯一のものは殺されるために準備され人 々である。
    Premium Member
    Hitokiri~'s Avatar
    Join Date
    Oct 2012
    Gender
    female
    Location
    Cancer.
    Posts
    1,201
    Reputation
    24
    Thanks
    937
    My Mood
    Bitchy
    Quote Originally Posted by javalover View Post
    ...
    C++ might've been awful back then but has come a long way.

    Just look at some builtin features of C++11, 14 and 17.

  2. #17
    javalover's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    167
    Reputation
    10
    Thanks
    532
    Quote Originally Posted by Hitokiri~ View Post

    C++ might've been awful back then but has come a long way.

    Just look at some builtin features of C++11, 14 and 17.
    C++ was released the '85, in the '90 universities were probably teaching just C. Torvalds said he tried it in the '92 and recently, he states there is still something to improve.

  3. #18
    殺す必要がある唯一のものは殺されるために準備され人 々である。
    Premium Member
    Hitokiri~'s Avatar
    Join Date
    Oct 2012
    Gender
    female
    Location
    Cancer.
    Posts
    1,201
    Reputation
    24
    Thanks
    937
    My Mood
    Bitchy
    Quote Originally Posted by javalover View Post
    C++ was released the '85, in the '90 universities were probably teaching just C. Torvalds said he tried it in the '92 and recently, he states there is still something to improve.
    There's always something you can improve. Hell even C can be improved too.
    I was referring to my own experience with C++ in contrast to C.

  4. #19
    javalover's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    167
    Reputation
    10
    Thanks
    532
    Quote Originally Posted by Hitokiri~ View Post

    There's always something you can improve. Hell even C can be improved too.
    actually i didn't say that just to say it, there are some particularities he doesn't like... at least in C++, he doesn't like its exception handling, stated as broken especially for kernels; finally, he wrote that he thinks every language which hides something like memory allocations behind you isn't good for kernels.

  5. #20
    nullptr_t's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    124
    Reputation
    10
    Thanks
    256
    Quote Originally Posted by javalover View Post
    actually i didn't say that just to say it, there are some particularities he doesn't like... at least in C++, he doesn't like its exception handling, stated as broken especially for kernels; finally, he wrote that he thinks every language which hides something like memory allocations behind you isn't good for kernels.
    Torvalds is a fucking kernel module developer and hence his opinion about c++ is fucking IRRELEVANT.
    Are you about to write an operating system from scratch? No? Then stop giving a fuck about his opinions on programming languages.

    - - - Updated - - -

    Quote Originally Posted by _NightWare View Post

    Or C?
    C is known for being so 'close' to the hardware (thus why linux is made with it)
    C++ is basically just an 'extension' to C. ASM, C, C++ all of them access the memory & are executed the same way, directly by the CPU.
    They all compile to object/machinecode.

    Zer0Mem0ry

    C/C++ Programmer, Youtuber, software enthusiast & hobbyist.

    Donate: (bitcoin): 1JhSKGgRQmir8rRF4Sm5CP4fDDofKFAypd

    Youtube: https://www.youtube.com/channel/UCDk...ariJF2Dn2j5WKA
    Skype: virtual_coder

  6. #21
    javalover's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    167
    Reputation
    10
    Thanks
    532
    Quote Originally Posted by nullptr_t View Post
    Torvalds is a fucking kernel module developer and hence his opinion about c++ is fucking IRRELEVANT.
    Oh yes, he developed a kernel, so he is just a kernel developer. How the fuc.k do you reason? Torvalds is a general software-engineer, easy.

    Quote Originally Posted by nullptr_t View Post
    Are you about to write an operating system from scratch? No? Then stop giving a fuck about his opinions on programming languages.
    That is: c++ exception handling is bad for kernel. You aren't going to develop a kernel? Then it's good.

    Summarizing, this is what you think about.

    Cool story, bro. Cy@

  7. #22
    nullptr_t's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    124
    Reputation
    10
    Thanks
    256
    Quote Originally Posted by javalover View Post
    Oh yes, he developed a kernel, so he is just a kernel developer. How the fuc.k do you reason? Torvalds is a general software-engineer, easy.



    That is: c++ exception handling is bad for kernel. You aren't going to develop a kernel? Then it's good.

    Summarizing, this is what you think about.

    Cool story, bro. Cy@
    Yeah, I agree, C++ isn't as useful for ring0 development, but what about usermode? Would you prefer obsolete C libraries over the modern C++ libraries for example Qt & Boost on windows?

    Zer0Mem0ry

    C/C++ Programmer, Youtuber, software enthusiast & hobbyist.

    Donate: (bitcoin): 1JhSKGgRQmir8rRF4Sm5CP4fDDofKFAypd

    Youtube: https://www.youtube.com/channel/UCDk...ariJF2Dn2j5WKA
    Skype: virtual_coder

  8. #23
    javalover's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    167
    Reputation
    10
    Thanks
    532
    Quote Originally Posted by nullptr_t View Post
    Yeah, I agree, C++ isn't as useful for ring0 development
    No ok, you are continuing to write meaningless things. C++ can access ring0, I've repeated it many times. I don't understand what you do mean for _useful_.

    Quote Originally Posted by nullptr_t View Post
    but what about usermode?
    What?

    Quote Originally Posted by nullptr_t View Post
    Would you prefer obsolete C libraries over the modern C++ libraries for example Qt & Boost on windows?
    A kernel is the core of an operating system, an interface between software and hardware. Qt isn't needed for developing kernel: its main purpose is to develop softwares with a graphical user interface. Boost works in low-level programming too, but it's not essential. In C there are also modern libraries as alternative (glib/gio), or APR. The only advantages of developing kernel in C++ are the object oriented peculiarities of the language, but it may bring inefficiency.

  9. #24
    nullptr_t's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    124
    Reputation
    10
    Thanks
    256
    Quote Originally Posted by javalover View Post
    No ok, you are continuing to write meaningless things. C++ can access ring0, I've repeated it many times. I don't understand what you do mean for _useful_.


    What?


    A kernel is the core of an operating system, an interface between software and hardware. Qt isn't needed for developing kernel: its main purpose is to develop softwares with a graphical user interface. Boost works in low-level programming too, but it's not essential. In C there are also modern libraries as alternative (glib/gio), or APR. The only advantages of developing kernel in C++ are the object oriented peculiarities of the language, but it may bring inefficiency.
    No, no, no, no. You completely missed my point here. And I know exactly what a kernel is, thank you. I was talking about usermode development, you know, standard Win32 applications, not kernel programs. And I was making a point why C++ is superior to C in usermode32 dev.

    Also, I was not saying that kernel development couldn't be done with C++, it's just a bit 'harder' than in C, because of the pitfalls C++ has for that (like constructors, runtime, e.g) Hence linux being written in C, C++ takes more effort to get the job done.
    Last edited by nullptr_t; 08-30-2016 at 01:02 AM.

    Zer0Mem0ry

    C/C++ Programmer, Youtuber, software enthusiast & hobbyist.

    Donate: (bitcoin): 1JhSKGgRQmir8rRF4Sm5CP4fDDofKFAypd

    Youtube: https://www.youtube.com/channel/UCDk...ariJF2Dn2j5WKA
    Skype: virtual_coder

  10. #25
    javalover's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    167
    Reputation
    10
    Thanks
    532
    Quote Originally Posted by nullptr_t View Post
    And I know exactly what a kernel is, thank you.
    If you had known what a kernel is, you probably didn't suggest using Qt:
    Quote Originally Posted by javalover View Post
    its main purpose is to develop softwares with a graphical user interface
    a kernel is not simply a software.
    You were referring just about usermode, but what does it has to do with the discussion?
    And no, you can't consider C++ better than C without specifying in which context it is. A C++ programmer is not constrained to use exception handling, especially in kernel code, but why should you use that language which does that extension which you are not going to use? Same thing for the OO paradigm when writing kernel code. I would prefer to make use of simplicity, I don't want to have something more that I won't to use.
    Seriously, if you don't understand this I don't want to continue an useless discussion with you.

    Quote Originally Posted by nullptr_t View Post
    because of the pitfalls C++ has for that (like constructors, runtime, e.g)
    C++ runtime is largely the C runtime, it hasn't nothing to do with it.

  11. #26
    nullptr_t's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    124
    Reputation
    10
    Thanks
    256
    Quote Originally Posted by javalover View Post
    If you had known what a kernel is, you probably didn't suggest using Qt: a kernel is not simply a software.
    You were referring just about usermode, but what does it has to do with the discussion?
    And no, you can't consider C++ better than C without specifying in which context it is. A C++ programmer is not constrained to use exception handling, especially in kernel code, but why should you use that language which does that extension which you are not going to use? Same thing for the OO paradigm when writing kernel code. I would prefer to make use of simplicity, I don't want to have something more that I won't to use.
    Seriously, if you don't understand this I don't want to continue an useless discussion with you.


    C++ runtime is largely the C runtime, it hasn't nothing to do with it.
    Did blatantly just leave my comments unread but still decided to reply?

    If you had known what a kernel is, you probably didn't suggest using Qt:
    Oh my god, I never suggested using Qt on lower rings (you even can't!), I was talking about
    regular program development, UI and so on.

    a kernel is not simply a software.
    Even though it's the base of the operating system,
    it's basically just a big collection of binaries executed by the CPU.
    Sounds like software to me.

    And no, you can't consider C++ better than C without specifying in which context it is.
    But I did? The context was general software development, for users. Like Utilities, Games, Tools, you name it.

    A C++ programmer is not constrained to use exception handling, especially in kernel code, but why should you use that language which does that extension which you are not going to use? Same thing for the OO paradigm when writing kernel code. I would prefer to make use of simplicity, I don't want to have something more that I won't to use.
    Correct, I would still prefer C over C++ in lower level development, but's that's the only area it beats C++.

    Seriously, if you don't understand this I don't want to continue an useless discussion with you.
    I believe I understand kernel level to the same extent as you do, if not even further. You just misinterpret my previous
    comments, which is fine. Maybe I didn't write them clear enough.


    C++ runtime is largely the C runtime, it hasn't nothing to do with it.
    That's partially true, yes. C++'s STL inherits and extends the standard C libraries, but it's
    also vastly different, wider and is structured so differently than the C libraries.


    You were referring just about usermode, but what does it has to do with the discussion?
    We are talking generally about which language is better C++ or C. When it comes to programming about
    90% of the devs never, ever even approach kernel/ring0 development, so an argument from A famous guy
    who basically only develops kernel modules, is pretty irrelevant for us, normal developers that target the Win32
    or other usermode environments.

    There are just so much more up-to-date, easy to use, advanced libraries for C++
    when comparing what C has to offer. Don't get me wrong, C behind every modern
    popular language in way or another, and still, today everything you can achieve in
    higher level languages can be achieved in C too, that just means a little more work.

    But back to the point, C++ has superseded C thus making it 'bit' obsolete for a
    modern time programmer. There are much wider variety of libraries and interfaces
    for C++ than there is for C. And you can complete your work with less lines of clean looking code
    and have a faster output & better results with C++.

    C++'s standard features and libraries are still being updated and maintained while C's latest standard
    update took place on 2011 and the previous one 1999.

    C++ has much wider userbase and is richer on libraries.
    It's 3rd party libraries are updated, new ones created, and old ones maintained more frequently than C's.

    Final Blow:

    - Templates
    - Function overloading
    - References
    - Namespaces
    - You can use structs and enums without writing struct or enum before every declaration or using typedefs.
    Even if you don't define your own classes, using C++'s string and container classes is still often more convenient and safe to work with than c-style strings and arrays.
    - Type safety (even though some would call it weak)
    - Exceptions
    - Variable declarations in conditionals, C99 only has it in 'for'
    - Object Orientation

    (pasted from: https://stackoverflow.com/questions/3...-better-than-c)

    Then there is the final factor why C++ is better than C:
    You don't miss out on any features of C when writing C++ code, you can write mostly C, but then you can
    take advantage of all of the C++'s libraries' features.


    - - - Updated - - -

    Quote Originally Posted by javalover View Post
    If you had known what a kernel is, you probably didn't suggest using Qt: a kernel is not simply a software.
    You were referring just about usermode, but what does it has to do with the discussion?
    And no, you can't consider C++ better than C without specifying in which context it is. A C++ programmer is not constrained to use exception handling, especially in kernel code, but why should you use that language which does that extension which you are not going to use? Same thing for the OO paradigm when writing kernel code. I would prefer to make use of simplicity, I don't want to have something more that I won't to use.
    Seriously, if you don't understand this I don't want to continue an useless discussion with you.


    C++ runtime is largely the C runtime, it hasn't nothing to do with it.
    Also, why the fuck is your name javalover? Java is an embodiment of what Linus Torvalds hates the most.
    Last edited by nullptr_t; 08-30-2016 at 12:42 PM.

    Zer0Mem0ry

    C/C++ Programmer, Youtuber, software enthusiast & hobbyist.

    Donate: (bitcoin): 1JhSKGgRQmir8rRF4Sm5CP4fDDofKFAypd

    Youtube: https://www.youtube.com/channel/UCDk...ariJF2Dn2j5WKA
    Skype: virtual_coder

  12. #27
    javalover's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    167
    Reputation
    10
    Thanks
    532
    First two rules to discuss with me: using correct english, not doing the blowhard.

    Quote Originally Posted by nullptr_t View Post
    Did blatantly just leave my comments unread but still decided to reply?
    I quoted every part of your reply. How did you think I didn't read it?

    Quote Originally Posted by nullptr_t View Post
    Oh my god, I never suggested using Qt on lower rings (you even can't!)
    Yes, you can. Qt includes also low-level application functionalities.

    Quote Originally Posted by nullptr_t View Post
    Even though it's the base of the operating system,
    it's basically just a big collection of binaries executed by the CPU.
    Sounds like software to me.
    No. The kernel is a mediator (interface) between software and hardware. It's what allows software and hardware to iteract between them. It's not a collection of binaries, and you can't call a kernel a software.

    Quote Originally Posted by nullptr_t View Post
    Correct, I would still prefer C over C++ in lower level development, but's that's the only area it beats C++.
    Hey, thank you judge of the correct/incorrect. But, incorrect. Today C doesn't beat C++, but years ago C was better to use because of the compilers. Torvalds wrote Linux in C because there was no great and nonbuggy C++ compiler back in 1990, and because of the philosophy of the simplicity (I've already wrote it about: I don't need that bad C++ exception handling or other OO peculiarities, so I prefer to use something simpler).

    Quote Originally Posted by nullptr_t View Post
    I believe I understand kernel level to the same extent as you do, if not even further.
    I don't even want to reply you here, you are so disquieting that you underestimate people you do not individually know. Maybe you will understand when you'll be matured.

    Quote Originally Posted by nullptr_t View Post
    We are talking generally about which language is better C++ or C.
    No, we are talking about which language is better to write kernel code: C++ or C. Don't go more OT than we currently are.

    Quote Originally Posted by nullptr_t View Post
    A famous guy
    who basically only develops kernel modules, is pretty irrelevant for us, normal developers that target the Win32
    or other usermode environments.
    First two rules to discuss with me: using correct english, not doing the blowhard.
    However, Torvalds isn't just a kernel developer, it's a general programmer. If I develop a kernel, does this mean I am just a kernel developer?

    Quote Originally Posted by nullptr_t View Post
    That's partially true, yes. C++'s STL inherits and extends the standard C libraries, but it's also vastly different, wider and is structured so differently than the C libraries.
    Runtime = collections of functions in the standard library. They may be a bit different in their implementations because C doesn't have generics or templates, but as the implementation may change, the concepts are not different. But we are talking about kernel-code, so some of the main concepts we will need to know like thread scheduling, coroutines, optimizing allocation mechanism and others are largely similar, so it's true. For example, coroutines could be used in the kernel as linkage for an event-wait code.

    Quote Originally Posted by nullptr_t View Post
    There are just so much more up-to-date, easy to use, advanced libraries for C++
    when comparing what C has to offer. Don't get me wrong, C behind every modern
    popular language in way or another, and still, today everything you can achieve in
    higher level languages can be achieved in C too, that just means a little more work.
    What's your problem of understanding this:
    Quote Originally Posted by javalover View Post
    A C++ programmer is not constrained to use exception handling, especially in kernel code, but why should you use that language which does that extension which you are not going to use? Same thing for the OO paradigm when writing kernel code. I would prefer to make use of simplicity, I don't want to have something more that I won't to use.
    Now you don't get me wrong: you wrote just something totally out of context, not necessarily something wrong.

    Quote Originally Posted by nullptr_t View Post
    Also, why the fuck is your name javalover? Java is an embodiment of what Linus Torvalds hates the most.
    What the f.uck does it have to do with it? Assuming Torvalds doesn't like Java, does this mean I'm forced to hate it? Seriously, everyone has his preference.

  13. #28
    RoPMadM's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    __asm
    Posts
    226
    Reputation
    12
    Thanks
    251
    My Mood
    Cynical
    Isn't this topic about polymorphic code?

    OfTopic: @javalover is clearly the more advanced guy here, but I don't want to interfere here.
    Would be cool to have a topic with your discussion, because it's pretty stirring and interesting.

  14. #29
    WasserEsser's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    735
    Reputation
    174
    Thanks
    677
    My Mood
    Busy
    Quote Originally Posted by RoPMadM View Post
    Isn't this topic about polymorphic code?
    Encryption isn't polymorphic code.

  15. #30
    RoPMadM's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    __asm
    Posts
    226
    Reputation
    12
    Thanks
    251
    My Mood
    Cynical
    Quote Originally Posted by WasserEsser View Post
    Encryption isn't polymorphic code.
    I know.
    I didn't claim that.
    The OP tried to.

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. [Tutorial] C/C++ Encrypt/Decrypt Functions & Memory At Runtime
    By nullptr_t in forum Counter-Strike 2 Coding & Resources
    Replies: 38
    Last Post: 04-26-2017, 08:44 AM
  2. Encrypt/Decrypt vb.Net?
    By o0OpurezO0o in forum Visual Basic Programming
    Replies: 24
    Last Post: 11-22-2010, 09:36 PM
  3. Encrypt/Decrypt Functions
    By CodeDemon in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 7
    Last Post: 09-09-2010, 04:59 AM
  4. Mods Encrypt/Decrypt???
    By SPA777174 in forum Call of Duty Modern Warfare 2 Help
    Replies: 0
    Last Post: 07-22-2010, 11:33 PM
  5. [TUT]Basic Encrypter\Decrypter
    By Bombsaway707 in forum Visual Basic Programming
    Replies: 30
    Last Post: 12-01-2009, 09:05 PM