3 ms·
If we're playing "recommend a language", I'll mention my personal favorite: Zig. -`const` for declaring immutables, `var` for mutables, do what you want. -Use
by AnIdiotOnTheNet 9y ago
If we're playing "recommend a language", I'll mention my personal favorite: Zig.
-`const` for declaring immutables, `var` for mutables, do what you want.
-Use globals if you want, or don't.
-Can directly import C headers, generally no need to write bindings.
-Personally I've found it significantly more productive
-Compiles fast, but lets be fair, people only bring this up because C++ and Rust are the outliers here by compiling so slowly.
Other noteworthy features:
-Standard library is completely optional.
-No default allocator.
-Comptime functionality instead of macros.
- eggy 9y agoI'll second Zig. I tried Rust and it was just too much overhead for me. I felt immediately comfortable with Zig, and focused on the task at hand. I hope it gets more traction and more people work on it. I will when I'm competent enough!
- solarkraft 9y agoIf we're playing "languages that compile to C" I'll add Vala. - Many apps for Elementary and other Gnome platforms are written in it - oop - properties/automatic getter,setter - for each loops - closures - reference counting - great compatibility with Gnome things - interoperable with c GTK example (from german wikipedia): using Gtk; int main (string[] args) { Gtk.init (ref args); var window = new Window (); window.title = "A simple GTK+ Program"; window.set_default_size (300, 50); window.position = WindowPosition.CENTER; window.destroy.connect (Gtk.main_quit); var button = new Button.with_label ("Click me!"); button.clicked.connect (() => { button.label = "Thanks!"; }); window.add (button); window.show_all (); Gtk.main (); return 0; } https://en.wikipedia.org/wiki/Vala_(programming_language) https://en.wikipedia.org/wiki/Vala_(programming_language) https://wiki.gnome.org/Projects/Vala https://wiki.gnome.org/Projects/Vala