Nein vala ist nicht tot auch wenn die GNOME Leute dass immer wieder behaupten. Für Embedded Projekte ist es super geeignet, und die Doku ist immer noch besser wie die von gtkmm. Nur weil die GNOME Leute alles gerne in purem C schreiben heißt das ja noch nicht dass dass außer denen keiner verwendet. Async und DBus ist in dieser Sprache wirklich schön gelöst. Auch der Overhead ist geringer wie der von gtkmm. Das mit den vapis ist auch einfacher und performanter wie function calls von C++ Wrappern aus, die dann vermutlich virtual sind und in eine Table kommen...
Rust und GO haben meiner Meinung nach noch weniger Tooling und Libs.
+ alles was Gobject ist (vapigen, pure OO) + alles was C ist. (ohne function call table) durch einfache vapis (OO oder auch nicht)
GO: + Bindings (function tables at the best und kein memory mangaement, und keine actors, const -> thread programming ) http://go-lang.cat-v.org/library-bindings
(Offizielle) Libraries in go (actors memory management und const) https://golang.org/pkg/
var button = new Button.with_label ("Click me!"); button.clicked.connect (() => { button.label = "Thank you"; });
window.add (button); window.show_all ();
Gtk.main (); return 0; }
-------------------------- go (mit wrappern)
package main
import ( "github.com/conformal/gotk3/gtk" "log" )
func main() { // Initialize GTK without parsing any command line arguments. gtk.Init(nil)
// Create a new toplevel window, set its title, and connect it to the // "destroy" signal to exit the GTK main loop when it is destroyed. win, err := gtk.WindowNew(gtk.WINDOW_TOPLEVEL) if err != nil { log.Fatal("Unable to create window:", err) } win.SetTitle("Simple Example") win.Connect("destroy", func() { gtk.MainQuit() })
// Create a new label widget to show in the window. l, err := gtk.LabelNew("Hello, gotk3!") if err != nil { log.Fatal("Unable to create label:", err) }
// Add the label to the window. win.Add(l)
// Set the default window size. win.SetDefaultSize(800, 600)
// Recursively show all widgets contained in this window. win.ShowAll()
// Begin executing the GTK main loop. This blocks until // gtk.MainQuit() is run. gtk.Main() }
Nein vala ist nicht tot auch wenn die GNOME Leute dass immer wieder behaupten. Für Embedded Projekte ist es super geeignet, und die Doku ist immer noch besser wie die von gtkmm. Nur weil die GNOME Leute alles gerne in purem C schreiben heißt das ja noch nicht dass dass außer denen keiner verwendet. Async und DBus ist in dieser Sprache wirklich schön gelöst. Auch der Overhead ist geringer wie der von gtkmm. Das mit den vapis ist auch einfacher und performanter wie function calls von C++ Wrappern aus, die dann vermutlich virtual sind und in eine Table kommen...
Rust und GO haben meiner Meinung nach noch weniger Tooling und Libs.
Ein Moment...GO soll weniger libs wie Vala haben?? Waten Du geraucht haben?
https://github.com/GNOME/vala/tree/master/vapi
https://github.com/nemequ/vala-extra-vapis
+ alles was Gobject ist (vapigen, pure OO)
+ alles was C ist. (ohne function call table) durch einfache vapis (OO oder auch nicht)
GO:
+ Bindings (function tables at the best und kein memory mangaement, und keine actors, const -> thread programming )
http://go-lang.cat-v.org/library-bindings
(Offizielle) Libraries in go (actors memory management und const)
https://golang.org/pkg/
Ich finde da hat vala mehr auch ohne rauchen
vala (imer aktuellstes gtk+)
--------------------------
using Gtk;
int main (string[] args) {
Gtk.init (ref args);
var window = new Window ();
window.title = "First GTK+ Program";
window.border_width = 10;
window.window_position = WindowPosition.CENTER;
window.set_default_size (350, 70);
window.destroy.connect (Gtk.main_quit);
var button = new Button.with_label ("Click me!");
button.clicked.connect (() => {
button.label = "Thank you";
});
window.add (button);
window.show_all ();
Gtk.main ();
return 0;
}
--------------------------
go (mit wrappern)
package main
import (
"github.com/conformal/gotk3/gtk"
"log"
)
func main() {
// Initialize GTK without parsing any command line arguments.
gtk.Init(nil)
// Create a new toplevel window, set its title, and connect it to the
// "destroy" signal to exit the GTK main loop when it is destroyed.
win, err := gtk.WindowNew(gtk.WINDOW_TOPLEVEL)
if err != nil {
log.Fatal("Unable to create window:", err)
}
win.SetTitle("Simple Example")
win.Connect("destroy", func() {
gtk.MainQuit()
})
// Create a new label widget to show in the window.
l, err := gtk.LabelNew("Hello, gotk3!")
if err != nil {
log.Fatal("Unable to create label:", err)
}
// Add the label to the window.
win.Add(l)
// Set the default window size.
win.SetDefaultSize(800, 600)
// Recursively show all widgets contained in this window.
win.ShowAll()
// Begin executing the GTK main loop. This blocks until
// gtk.MainQuit() is run.
gtk.Main()
}