Re:GTK has a new website
by tomtheelder on Sunday March 01, 2020 @05:34PM
(#22459867)
I don't think that's strange at all. Having JS as your example has the potential to lure in a huge pool of developers who have no idea that this is even an option for GUI development in JS. On the other hand, C developers are almost certainly already aware of GTK.
I don't really think that C being the native language has any significance in this case.
No this seems appropriate. And isn’t too far off from project ideals. The somewhat retconned* argument for using C for GTK+ was that it was the most easy to produce bindings for. This was in the FAQ years ago as a mild discouragement from actually using C to produce apps. The verbiage was something akin to C is a library language not an application language. But this goes back nearly 20 years.
* this disclaimer because yes I know that gtk was a originally a quick hack to avoid Motif.. that definitely changed by 2.0.
That example lead me exploring how to build GTK app with JavaScript. Not sure how it compares to Python or Vala performance wise, but now I can quickly build simple apps with GUI for my own use.
Here are some resources, if anyone else is interested:
https://developer.gnome.org/gnome-devel-demos/stable/js.html...
C is the native language because it's the lowest common denominator, not necessarily because they want everyone writing their front-end applications in C.
It's simply something that works everywhere and can easily have performant and ergonomic bindings for $your-favorite-language.
They’re trying to cater to people who would otherwise select Electron or something, assuming that it is impossible to get a cross-platform GUI written in JavaScript without bringing all of Chromium along with it.
I think it's pretty strange that the code example widget defaults to showing JavaScript code, considering that C is GTK's native language.