Erik Engheim
Oct 14, 2022

--

You hit a good point Janek. Language flexibility while cool can kill readability and make code hard to maintain and understand.

This is something I struggle with in trying decide whether Zig is a language I recommend or not. In its favor it uses the same langauge for comptime as runtime. Yet because Zig doesn't have stuff like proper classes, interfaces, multiple-dispatch or similar you end up writing comptime code almost constantly.

That means a lot of code becomes uncessarily clunky. I like that in e.g. Julia I get very far with just multiple-dispatch. While Julia has advanced macros and code generation, I rarely need to use it.

comptime in contrast is hard to avoid using in Zig.

--

--

Erik Engheim
Erik Engheim

Written by Erik Engheim

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.

No responses yet