3 ms·
From my brief look at the documentation, the answers look like this: they have a defer statement much like Go's, they don't seem to have any form of generics, t
by nine_k 5y ago
From my brief look at the documentation, the answers look like this: they have a defer statement much like Go's, they don't seem to have any form of generics, they don't seem to have any form of comptime logic.
They really need a section on the landing page to compare Hare to Zig. (And to C, for that matter.)
- throw10920 5y ago> they don't seem to have any form of comptime logic Or macros, not even textual C-style ones. Non-starter for me.
- wheelerof4te 5y agoMacros were one of the biggest mistakes that C allowed, along with the undefined behavior. Not allowing macros means a more standardized reference implementation, which translates to a more readable code overall.
- nine_k 5y agoSimple textual substitution macros are indeed pain. Nicer, AST-level macros can be better, but can also be a pain (see Lisp, C++ for examples of either).
- conaclos 5y agoIt seems that Hare has some restricted comptime logic. See section 6.8 of the spec [1] [1] https://harelang.org/specification.pdf https://harelang.org/specification.pdf