Tagged articles

compile-time evaluation

2 articles · Page 1 of 1
Golang Shines
Golang Shines
Jul 1, 2026 · Fundamentals

Go Compile‑Time Constant Folding: An Investigation

The article examines how Go’s compiler handles constant folding, using the vtprotobuf SizeVT function to illustrate compile‑time size calculations, and explains that inlining feasibility and compile‑time known arguments are key factors that determine whether expressions are folded into constants.

compile-time evaluationcompilerconstant folding
0 likes · 5 min read
Go Compile‑Time Constant Folding: An Investigation
Golang Shines
Golang Shines
Mar 11, 2026 · Fundamentals

The Hidden Privilege of Go’s Type System: Untyped Constants

The article explains how Go’s untyped constants act as a hidden privilege, allowing compile‑time high‑precision calculations without overflow, implicit type adaptation, and reduced boilerplate, while contrasting them with typed variables and discussing design trade‑offs and default type pitfalls.

Implicit ConversionUntyped Constantscompile-time evaluation
0 likes · 9 min read
The Hidden Privilege of Go’s Type System: Untyped Constants