Skip to main content


GitHub - pijng/prep: Golang comptime. Pure blasphemy

prep is a small Go tool that enables compile-time function evaluation. By using prep.Comptime, you can evaluate functions at build time, replacing them with their computed results. Just like comptime from Zig. Except it's not.

https://github.com/pijng/prep

in reply to cheewai

Why pure blasmemy? If a function can be evalueted at compile time I don't see way it shall not be done. AFAICS it is possible only if the arguments of the function are constants or computable from constants.
in reply to cheewai

sorry, I overlooked it... this reminds me to check if #LibertyEiffel has this optimization!

This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.