Get the latest tech news

Prep: Golang Comptime


Golang comptime. Pure blasphemy. Contribute to pijng/prep development by creating an account on GitHub.

Compile-Time Evaluation: Replace function calls with their computed results at build time. This command will evaluate all functions wrapped with prep.Comptime and replace them with their computed results during the build. Only functions that can be fully resolved with the provided literal arguments can be evaluated at compile-time, therefore it is impossible to use any values from IO operations.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of prep

prep

Photo of golang

golang

Photo of Golang Comptime

Golang Comptime

Related news:

News photo

Show HN: htmgo - build simple and scalable systems with golang + htmx

News photo

Goja: A Golang JavaScript Runtime

News photo

Mastering ISO 8583 Message Networking with Golang