Re:Ziglings: Learn the Zig programming language by fixing ti...
by kristoff_it on Saturday February 13, 2021 @05:04PM
(#26127410)
The misunderstanding lies in not realizing how lazy evaluation is an integral part of what makes comptime a useful tool and that removing it would break comptime horribly.
[ Parent
| on HN ]
Re:Ziglings: Learn the Zig programming language by fixing ti...
by haberman on Saturday February 13, 2021 @05:22PM
(#26127551)
That seems a bit of an overstatement. Calls to sometimes-unavailable functions are but one of the many uses of comptime. It seems entirely possible that lazily-analyzed blocks or functions could be demarcated syntactically (eg. "lazy { }") and that the large majority of comptime evaluation would not need to be inside such a block.