3 ms·
The previous site, for comparison: https://web.archive.org/web/20200209181217/https://www.gtk.org/ https://web.archive.org/web/20200209181217/https://www.gtk.o.
by jtvjan 7y ago
The previous site, for comparison: https://web.archive.org/web/20200209181217/https://www.gtk.org/ https://web.archive.org/web/20200209181217/https://www.gtk.o...
I think it's pretty strange that the code example widget defaults to showing JavaScript code, considering that C is GTK's native language.
- Sirikon 7y agoProbably they are aiming at developers that want to use JavaScript for UIs but don't want Electron.
- snazz 7y agoThey’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.
- catblast 7y agoNo 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.
- tomtheelder 7y agoI 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.
- pengaru 7y agoC 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.
- butz 7y agoThat 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.en https://developer.gnome.org/gnome-devel-demos/stable/js.html... https://gjs-tutorial.readthedocs.io/en/latest/ https://gjs-tutorial.readthedocs.io/en/latest/