Announcement

Collapse
No announcement yet.

The Tech Preview Of Servo/Browser.html Is Imminent!

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

  • #11
    Originally posted by jrch2k8 View Post

    true you are right, i'm no rust expert but from what i've seen is more akin to D than to full C++, so it's a bit higher level(i can be wrong TM), but yeah i guess the point is every language fill a need in a very complex and dynamic market, so developers should find the right tools for the job in question, in fact no one says you cannot use several languages in a project as long as they are used properly
    It's more D than C# but it's more C++ than D. Java/C# -> D -> Rust -> C++/C.

    Java and C# are a VM with garbage collection and runtime checks, D removes the VM (and can technically be used without garbage collection but always is), and Rust removes the garbage collector leaving just some runtime bounds checks akin to what you'd get with modern C++ anyways.

    Rust also allows you to run "unsafe" sections if you want where there are no checks or if you wanted to import some ASM for a boot function or tuned loop as in C/C++. The compiler does all optimizations and memory safety verification (except run times bounds checks and such) so that doesn't have to hit runtime. It relies on LLVM so has as much experience in optimization as you'd expect a C/C++ program compiled via LLVM to have. You're also quite allowed to replace standard libraries that interact at the system or hardware level with your own (or not even use the Rust standard lib), I believe D also shares this but is slightly more limited. You can also tweak things like SIMD (built into the standard library) or custom instructions in the same way you would with C/C++. Also the entire language was designed with parallelism in mind rather than added on later. Naturally you have full control of how your process is scheduled to the extent the OS allows as well.

    In short Rust is comparative to modern C++ with extra grammar for compile time checks and none of the legacy baggage. It is not run in a VM or with a garbage collector or abstracted away from the physical hardware, it just checks to make sure you aren't shooting yourself in the foot while twiddling bits.

    Comment


    • #12
      Originally posted by Master5000 View Post
      I always find it funny when morons who can't program in C++ think that they will create a new language that will make programming easier so even they can do it. Rust is shit and it's dead on arrival.
      How can it be dead on arrival when it is of the most popular programming languages to date? How can you call people who have been writing C++ software at a professional level for decades as 'morons who can't program in C++'? Sounds to me like you are just trolling without any basis to stand upon.

      Comment


      • #13
        Originally posted by jrch2k8 View Post
        Nope, actually is harder because it is better and C is harder than C++ because it is even better and so on.

        To elaborate a bit, lower level languages are exponentially closer to what the actual hardware speak, hence they become less intuitive because they are farther away from how our brain process information. this is also the reason is very hard to even close in performance to ASM/C/C++ when you go up in the chain.

        Because of this there is no perfect language, you either compromise for performance make it in harder or compromise performance to make it easier.

        One of the strongest/weakest point in C/C++ is the very flexible way you are allowed to handle memory and polymorphism, when properly used you are able to skyrocket performance/scalability or completely destroy it/tank it at the same time because it all depends on the hardware, with higher level languages you get a middle point(at best) because the runtime is the one trying to translate what you meant into hardware efficiently but it cannot go as deep as you can.
        Sorry, but your idea about C++ being better and harder and that it is lower level than Rust is purely false. Rust's libcore interfaces directly with llvm primitives, which makes it lower level than C. It effectively gains Assembly-level performance, and you are free to write software with #[no_std] so that you can build your own incredibly low level applications without Rust's free high level abstractions. Rust's libstd provides higher level features than C++ while the core language is far more expressive, but it still retains the performance of C and better, when you compare Clang-compiled C to Rust.

        Rust is much more verbose and strict on the programmer than C++, so to say that C++ is harder than Rust is absolutely false. There are a lot of C++ programmers who find learning Rust to be harder because it enforces much stricter rules with it's ownership and borrowing mechanism, in addition to strict rules regarding error handling and pattern matching. It has a very steep learning curve at the beginning, much as learning to use a CLI interface over a GUI interface, but once you have mastered it, it is more convenient than C and C++, and yet still lower level than both. Because of these strict compiler rules, and that Rust is deeply integrated with LLVM primitives, it is able to supply more information to the compiler to better optimizations a wider range of scenarios without putting too much work on the compiler developer to produce magic.
        Last edited by mmstick; 27 June 2016, 11:24 PM.

        Comment


        • #14
          Originally posted by mmstick View Post

          Sorry, but your idea about C++ being better and harder and that it is lower level than Rust is purely false. Rust's libcore interfaces directly with llvm primitives, which makes it lower level than C. It effectively gains Assembly-level performance, and you are free to write software with #[no_std] so that you can build your own incredibly low level applications without Rust's free high level abstractions. Rust's libstd provides higher level features than C++ while the core language is far more expressive, but it still retains the performance of C and better, when you compare Clang-compiled C to Rust.

          Rust is much more verbose and strict on the programmer than C++, so to say that C++ is harder than Rust is absolutely false. There are a lot of C++ programmers who find learning Rust to be harder because it enforces much stricter rules with it's ownership and borrowing mechanism, in addition to strict rules regarding error handling and pattern matching. It has a very steep learning curve at the beginning, much as learning to use a CLI interface over a GUI interface, but once you have mastered it, it is more convenient than C and C++, and yet still lower level than both. Because of these strict compiler rules, and that Rust is deeply integrated with LLVM primitives, it is able to supply more information to the compiler to better optimizations a wider range of scenarios without putting too much work on the compiler developer to produce magic.
          yeah i named rust by mistake as high level, fixed in later post.

          about rust, how well it handles llvm-svn versions? my radeonsi driver is more a priority to me than try rust, so if it doesn't tend to brake too often i could give it a chance.

          Rust, in your experience has actual measurable consistent results? again no doubting you but at least for C/C++ clang get kicked by GCC in runtime performance in several cases(loop /valgrind testing freak here) and somehow LTO and other advanced features are not too trustworthy yet in Clang but i get rust uses the internals so maybe is not suffering from this or improves it internally?

          about your comment about C++, well through the years many awesome languages that in theory and in practice have some neat features come and go but C/C++ always remains constant and there is a reason, C/C++ is a behemoth sized institution of experience, documentation, developer population, actual critical software, corporate backing, expert support, etc. So any language that try to state "is better than" or "as good as" will be compared to that high standard and get rejected(specially on businesses).

          So i don't doubt for one second rust is transiting the right highway and that the firefox community has put some serious man power into it, but it just need some time to start to compete to C/C++ behemoth institutional infrastructure to become more appealing to professional C/C++developers in the future.

          Update: additionally to C++ trained eyes rust syntax is horribly confusing but i guess is by design to engage more higher level languages developers easier.
          Last edited by jrch2k8; 28 June 2016, 12:38 AM.

          Comment


          • #15
            There is no correlation between how low level something is and how difficult it is to program in.
            C++ is higher level than C but I've yet to hear anyone claim it's easier than C. Likewise, Haskell can be a fairly complex language, despite being high-level.

            Manual memory management is only one jigsaw in the puzzle of complexity.

            Comment


            • #16
              Originally posted by Master5000 View Post
              I always find it funny when morons who can't program in C++ think that they will create a new language that will make programming easier so even they can do it. Rust is shit and it's dead on arrival.
              I always find it funny when people who probably can't write anything outside of VB6 call others "morons who can't program in C++".
              Never mind that I wouldn't exactly call "C++ programmer" a badge of honour in the first place.

              Comment


              • #17
                Originally posted by Master5000 View Post
                I always find it funny when morons who can't program in C++ think that they will create a new language that will make programming easier so even they can do it. Rust is shit and it's dead on arrival.
                There are lots of these morons: see Stroustrup's last year talk about C++ core guidelines which, using some template magic (ie owned<T*> as a synonym for T*, but which means that pointer should bee deleted) and some annotations ([[lifetime(this)]] for example) reinvents rust's borrow checker, which is implemented as an external tool. So, now C++ becomes more rust-like, except it compiles tens times slower, requires external tool pass to check memory management, has pointer ambiguity (optional parameter? Output value? Array? Dynamic polymorph type?), and haven't sane sum types.

                Comment


                • #18
                  I checked browser.html like a month ago. For browser written in HTML, it would only score 200 something points in html5test.
                  I have a feeling this will be a really limited tech-preview. Still, it's a step forward.

                  Comment


                  • #19
                    Seriously guys... I don't think it's good to bash a software just because it's not written in C++. There's no 'one size fit it all' kind of things. C++ might fit your needs, but might not for theirs. If they think Rust if comparable with C++, let them prove it with their code... It's probably better than C++. Who knows ?

                    Comment


                    • #20
                      Originally posted by Master5000 View Post
                      Rust speed is equal to that of Java: http://www.viva64.com/en/b/0324/ Hahaha they created another Java. Only suckier.
                      But Java speed is equal to C++: http://www.javaworld.com/article/207...--.html?page=2
                      Therefore Rust is fast as C++.

                      See? I can post links, too.

                      Comment

                      Working...
                      X