proposal: Go 2: Permit running code at compile-time using "comptime" keyword #39216
Labels
FrozenDueToAge
LanguageChange
Proposal
Proposal-FinalCommentPeriod
v2
A language change or incompatible library change
Milestone
Problem
I want to read in the content of files while compiling time to simplify the shipping of template files with a binary.
Solution
using the comptime keyword to run arbitrary code at compilation-time.
Ref: https://ziglang.org/documentation/master/#Introducing-the-Compile-Time-Concept
Design idea
The text was updated successfully, but these errors were encountered: