Announcement

Collapse
No announcement yet.

Indian Developers Redesigning Linux Kernel With OOP, C++ Support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #51
    Abstractions will not improve performance or stability, and will only add to the complexity of the code. Rewriting the kernel in C++ doesn't serve any purpose, in fact we should rather do more optimizing of the C code and use more assembly where there is great benefits.

    Originally posted by Luke_Wolf View Post
    As much as I'm all for C++ing the kernel and reducing the complexity of the kernel through OOP techniques, they should have picked a different kernel to do this. Linux changes way too fast, the pre-existing code base is too big for just a few people to convert, and the upstream is hostile to C++ and OOP which means that this is going to be a permanent fork which is going to require a lot of work for them to maintain.
    Using OOP in the kernel will not reduce the complexity, on the contrary it will actually increase the complexity and make it harder to maintain. Inheritance only serve a purpose when most of the code is being reused and each class only need minor modifications. Complex inheritance is a pain in the ass to maintain.

    Comment


    • #52
      Originally posted by chrisb View Post
      Moving to an object-oriented language is a great idea, but C++ is too old and complicated and programmers would still have to deal with memory allocation. Would be better to use a microkernel with XML API and loadable modern OO language (Java or C#) servlets for all ?kernel modules and drivers. We could call it Fluck, to signify all the objects working together.
      You made an excellent point in the first sentence though I got the rest a good humor.

      C++ is a half baked OOP language and is way too old and cannot prevent bad practice of software engineering. C++ with STL templates is an improvement but still has the legacy piece that could be easily abused. Forget about it.

      I agree that kernel can be done (and would be an excellent exemplifying OS if done so) in a safer OOP language that does not use pointers or has safe pointer usage, customized memory pool, synchronization using customized semaphore/muted/lock/event. C++ is definite not the choice. Rust/go alike is closer. But if a new safe language is needed to fit the kernel best, I vote for creating it.

      Comment


      • #53
        Originally posted by efikkan View Post
        Abstractions will not improve performance or stability, and will only add to the complexity of the code. Rewriting the kernel in C++ doesn't serve any purpose, in fact we should rather do more optimizing of the C code and use more assembly where there is great benefits.


        Using OOP in the kernel will not reduce the complexity, on the contrary it will actually increase the complexity and make it harder to maintain. Inheritance only serve a purpose when most of the code is being reused and each class only need minor modifications. Complex inheritance is a pain in the ass to maintain.
        Agree with you. Class inheritance has faded away in favor of interfaces in realistic projects out of text book. If there is benefit to use inheritance in some cases, such cases are pretty rare, and can be replaced easily with a small common function library.

        Comment


        • #54
          diosix: "A lightweight, scalable microkernel for x86-64, ARM32 and ARM64"

          Written in Rust/assembly.
          Still a work in progress.

          Comment


          • #55
            Originally posted by curaga View Post
            If you're advocating building C with a C++ compiler, it comes only with downsides: larger binaries, slower operation, and slower compilation.
            Slower compilation and larger bins - maybe, but there is zero performance hit with C++ as opposed to C. I can prove this to you in more than hundred ways.. but I won't.

            Comment


            • #56
              Originally posted by Nobu View Post
              diosix: "A lightweight, scalable microkernel for x86-64, ARM32 and ARM64"

              Written in Rust/assembly.
              Still a work in progress.
              Now that would be ballsy. The things a kernel/OS project could do for Rust... it'll make it a top notch language in no time if such collaboration happened.

              Comment


              • #57
                Originally posted by leonmaxx View Post
                Another useless tons of work. Would be better if some one tried to make Linux a micro-kernel.

                +100000, Couldn't agree more!

                Comment


                • #58
                  If they really wanted to do a contribution, they could have made a drop-in replacement of one of the modules instead of the whole kernel. Smaller parts get rewritten and replaced all the time, and is the key to how the Linux kernel has stayed on top for so many years.

                  But I really don't like the attitude of so many such initiatives:
                  "I've taken a class of OOP at the university, so I've seen the future, and I know much better than those stubborn old wise guys doing the Linux kernel".
                  This type of attitude is all over the field of software development, from kernel development, drivers, server applications, GUI applications to even web related software. There always seem to come someone along with some knowledge of "the new approach" but none of the old, true and tested approach.

                  I'm all for improvements and innovations, but in order to do this the developers need to master both the old one and the new approach in order to decide which is better.

                  Comment


                  • #59
                    Originally posted by efikkan View Post
                    old wise guys doing the Linux kernel
                    Those old guys are producing or committing broken code full of beginner's mistakes. It looks like they have no education because using development method try-fail instead of proper development process.
                    There always seem to come someone along with some knowledge of "the new approach" but none of the old, true and tested approach.
                    It is called evolution. Without evolution people would still e.g. ride horses instead of driving cars.

                    Comment


                    • #60
                      Originally posted by MartinN View Post
                      Now that would be ballsy. The things a kernel/OS project could do for Rust... it'll make it a top notch language in no time if such collaboration happened.
                      Still a set of glibc, qt, gtk libs plus many more are needed for rust to really fly. Or at lease a wrapper layer is needed so that GUI apps can use Rust easily. Long way to go.

                      Comment

                      Working...
                      X