Announcement

Collapse
No announcement yet.

Librsvg Continues Rust Conquest, Pulls In CSS Parsing Code From Mozilla Servo

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

  • #11
    Originally posted by kpedersen View Post

    I agree but if you want a homogeneous, clean environment... simply don't use Gnome, it is a sinking ship. After all, these are the same guys who dragged in the entirety of Mono framework for a tiny note taking application (Tomboy) XD.
    I wonder what language is recommended for writing Gnome applications? Some of them are using C, Vala, js, rust, python. What should one learn?

    Comment


    • #12
      Originally posted by Volta View Post

      I wonder what language is recommended for writing Gnome applications? Some of them are using C, Vala, js, rust, python. What should one learn?
      Short answer; C

      I know that maintaining an old C program in 20 years is possible. Maintaining a Vala or Python 3.x program once those languages are long dead is not possible and requires a rewrite.

      Long answer; Don't write Gnome programs. Write portable software that is well engineered. Use any language you know will still be around for the lifespan of your software.

      Comment


      • #13
        Originally posted by kpedersen View Post
        Short answer; C

        I know that maintaining an old C program in 20 years is possible. Maintaining a Vala or Python 3.x program once those languages are long dead is not possible and requires a rewrite.

        Long answer; Don't write Gnome programs. Write portable software that is well engineered. Use any language you know will still be around for the lifespan of your software.
        I don't disagree with any of this - in another light, you could say "do it right the first time around". But with the evolution of software and hardware, practically nothing stays relevant for 20 years; particularly user-level stuff. If the software you're writing has a "shelf life" (even if indefinite), at that point you should pick whatever language suits your needs or environment.
        So - if Volta wants to write a GTK3 program, well, I think we can all agree GTK3 isn't going to be used 20 years from now. At that point Volta has 3 factors to consider:
        A. What language are you most proficient in?
        B. What language requires the least amount of user-intervention for your target demographic? (for example, dependencies)
        C. Does performance matter?

        Comment


        • #14
          Originally posted by bug77 View Post
          What would be the advantage of C over Rust these days? I mean, they both translate to LLVM generated code anyway.
          Your audit team might tell you that they're bored and that your project needs more memory bugs for them to fix

          Comment


          • #15
            Originally posted by uid313 View Post

            No, Rust is just as fast as C but with the benefits of being safer.
            Except not portable, making it useless.

            Comment


            • #16
              Originally posted by oleid View Post

              Why would they?
              Need code that is portable. Rust falls flat on its face there. Same stupid shit as Java.

              Comment


              • #17
                Originally posted by Volta View Post

                I wonder what language is recommended for writing Gnome applications? Some of them are using C, Vala, js, rust, python. What should one learn?
                You can also use JavaScript.
                GTK+ is also exposed through GObject Introspection, so you can use any language which supports that.

                Vala is a language which reminds of C# but compiles down to C.

                It depends on what kind of programmer you are and what languages you already know. If you already know a language with GTK bindings you can use that.
                If you are new to programming than Python and JavaScript are easier to learn.
                Coding in C and Rust is much more difficult than Python or JavaScript.
                But with Python and JavaScript can more quickly throw together an application and you don't have to worry about memory safety, freeing memory, buffer overflows, and all those kinds of things.
                Personally I've coded GTK applications in Python. I can't code in C because it is too difficult and complex for me.

                Comment


                • #18
                  Originally posted by brad0 View Post

                  Except not portable, making it useless.
                  What's not portable about Rust? And do all your projects need to run on x86, ARM, MIPS and RISC-V at the same time?

                  Comment


                  • #19
                    Originally posted by Volta View Post

                    I wonder what language is recommended for writing Gnome applications? Some of them are using C, Vala, js, rust, python. What should one learn?
                    Gnome is mostly based on GLib and with GLib Object Introspection, you can pretty much use whatever language you like. C and Rust are ground-level languages while JS and Python are very high-level languages, making them easy to use and added magic that's very comfortable. Vala is designed specifically for GLib and to resemble Java and C#, while compiling to C, making it a native and very fast language.

                    The languages are just as good and it's a matter of your preferences. Personally, I really love Vala.

                    Comment


                    • #20
                      Originally posted by Britoid View Post

                      I actually think it's a shame the GTK# bindings are in a pretty dire state.
                      All bindings end up in this state eventually. One of the single most important things about C and C++ is that you don't need bindings. Much less risk of things starting to bitrot.

                      Until languages start coming out that can consume .so / .dll / .lib files directly, I don't think we will ever see C or C++ being displaced.

                      A good example is here: https://doc.rust-lang.org/1.9.0/book/ffi.html
                      Notice that Rust goes through all the effort to be able to call into ANSI C libraries. Why not call into Java or Python libraries directly? This immediately puts Java and Python at a disadvantage when it comes to interop as a language choice.

                      Comment

                      Working...
                      X