5 ms·
You can't use Crystal to write ruby extensions, because it has a huge runtime and a big GC. You can call Ruby script in Crystal though. [0] And I think Zig wou
by npn 4y ago
You can't use Crystal to write ruby extensions, because it has a huge runtime and a big GC.
You can call Ruby script in Crystal though. [0]
And I think Zig would be easier to maintain compare to Rust because it is a simpler language. Sure there is a lot of breaking changes, but it's not much of trouble for a language that can be read in one afternoon (referring to the single page document).
[0]: https://github.com/Anyolite/anyolite https://github.com/Anyolite/anyolite
- masklinn 4y ago> And I think Zig would be easier to maintain compare to Rust because it is a simpler language. Which is not necessarily helpful when you're mostly not using it, and mostly as a way to build extensions for an other language: in that case what you want is a language which protects you from mistakes, and a glue layer which integrates safely (and hopefully idiomatically) between the two, aka pretty extensive safety abstractions, aka pretty much the opposite of zig.
- greenpeas 4y ago> Which is not necessarily helpful when you're mostly not using it When I return to a project written in a language that I don't use regularly, I basically have to re-learn the language (maybe there's something wrong with me, but I even forget the basics of a language that used to be my primary driver after I've not written in it for more than a year or two). So if I need to re-learn a language to make some changes, I think I'd much rather re-learn a simpler language.
- still_grokking 4y ago> I even forget the basics of a language that used to be my primary driver after I've not written in it for more than a year or two Same for me. But "re-learning" takes half a day at most. I just need to get used to it again, remember the idioms, remember the quirks. Of course this is more of an issue if you come back and half of the language changed in the meantime. (Something that's not so uncommon for pre-v1 stuff…)
- npn 4y agoSafety is overrated. If safety is the most important aspect of software then we should have been using Ada for everything by now. The same with idiomatic, in order to write code in a language idiomatically, you have to spend a lot of time using it, and much more time for a huge language like Rust. Usually people can't afford that, they want to rewrite the extension in a more performant language because they want the speed, not because they like the language they use to implement the extension (may be they do, but that's not the point). So simpler language like Zig is definitely better, the developers can just look at the one page document, implement the feature (with testing and all), then forget about it and come back to the language they are using daily.
- still_grokking 4y ago> Safety is overrated. If safety is the most important aspect of software then we should have been using Ada for everything by now. I would guess nobody would say something such stupid if they would be actually legally liable for the code they ship. Where people actually can be sued for software bugs ADA is widely used, btw. The good news is: The EU is working on removing the liability exclusion for software products finally. Let's see whether someone would say "safety is overrated" again after the EU authorities are done with changing the legislation and vendors will end up in front of a court for security breaches caused by the software they ship.