Hacker News
points by delifue 2 days ago | 0 comments
The article says some Zig advantages but it's worth noting that all these advantages are tradeoffs.

Zig makes handling error easy but makes retaining error information hard. The result is that Zig developers either write more code than other languages to store diagnostic information, or just simply discard diagnostic information. The second makes it much harder to debug because the useful error information is discarded.

About the TigerStyle, it's worth noting that TigerBeetle doesn't even support variable-sized string type. You can store fixed-sized data, such as a string that's at most 32 bytes. What if the order information contains string longer than 32 bytes? Then you need to store that string in antoher database. TigerBeetle is not a general database. Static memory allocation doesn't fit most applicaitons.

The fallable allocation is useful in embedded system and OS development etc., but useless in common application programming, because OOM results in crash rather than failed allocaiton.

[–] tel 1 day ago
> TigerBeetle is not a general database

TB is… extremely forthcoming about this. They’re very explicitly building a specific sort of distributed state machine for high volume transaction data.

If they were building something else they’d end up with a different design. And I suspect a lot of TigerStyle would still apply if that other thing we’re interested in performance or correctness.

[–] KingMob 1 day ago
I'm always a bit surprised when people cite TigerBeetle for anything (Zig excellence, coding style, etc). They've made some unique choices that work great for them, but it really doesn't seem like they can be universally applied.

I'd bet only a small % of people praising TigerStyle actually disallow all runtime allocation in their own programs.

[–] grg0 1 day ago
Thanks for pointing that out, it does explain many things. It's tiring to read about languages and projects like they are some hot shit that makes everything before it obsolete when in reality it's just a different set of trade-offs. We should approach discussions more objectively like your comment does and less like a marketing slide.
Hacker News