Originally posted by kpedersen
View Post
Announcement
Collapse
No announcement yet.
Librsvg Continues Rust Conquest, Pulls In CSS Parsing Code From Mozilla Servo
Collapse
X
-
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?
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.
- Likes 4
Comment
-
Originally posted by kpedersen View PostShort 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.
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?
- Likes 5
Comment
-
-
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?
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.
- Likes 2
Comment
-
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?
The languages are just as good and it's a matter of your preferences. Personally, I really love Vala.
- Likes 4
Comment
-
Originally posted by Britoid View Post
I actually think it's a shame the GTK# bindings are in a pretty dire state.
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.
- Likes 1
Comment
Comment