3 ms·
But it was again rewritten in Dart and the Dart version is now the reference implementation. And they did that because for a lot of Sass users, working with Rub
by Klathmon 8y ago
But it was again rewritten in Dart and the Dart version is now the reference implementation. And they did that because for a lot of Sass users, working with Ruby sucked, simply because they didn't have the tooling and knowledge built up to handle it correctly.
Libsass's main "claim to fame" is that just about all languages (including Javascript on the backend) can interop with C/C++ pretty effortlessly. The rewrite was more about enabling more and more users to use the languages and package managers they are used to rather than about speed (especially since the Dart SASS implementation is quite often FASTER than the libsass version!) Take a look at the Sass perf benchmarks below for more info:
https://github.com/sass/dart-sass/blob/master/perf.md https://github.com/sass/dart-sass/blob/master/perf.md
Although keep in mind that a lot of the performance benefits go away when you run Dart Sass via javascript compilation in regular node. But IMO that gives you a lot of choice. You can get the best performance by installing the Dart toolchain and running it "natively" on dart, or you can run it via node for "okay" speed in most cases, or you can deal with native compilation via C/C++ and libsass for a mix of both. It's a nice setup they have going on over there!
- yakshaving_jgt 8y agoI’m not really disputing any of that. My point is that the performance benefit of implementing a web UI build tool in a compiled language is not always insignificant. And as you conceded in another comment in the thread, you can use npm to distribute pre-compiled binaries, so I don’t think the “it’s too cumbersome to download a binary” argument holds much water either.
- Klathmon 8y agoWe are on the same page! If the binaries are distributed over npm and work well in the npm ecosystem, them I'm all for it! My only reservations are about blindly writing things in compiled languages, or not using package managers at all because it's easier to distribute, which I don't think it is. One of the really good things sass did with the rewrite in dart was make the default installable package include the dart VM along with it. So the install process is almost identical to any other JS package, which is why IMO they did such an amazing job with it