HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by cgh | Hacker News Reader
Parent
Full thread
cgh
·
Zig could include the file at compile-time with @embedFile.
View on HN
Twirrim
·
So could Go (
https://pkg.go.dev/embed
), Rust (
https://doc.rust-lang.org/std/macro.include_str.html
) and a number of other languages in the set.
AndyKelley
·
this would provide the optimizer the unfair chance to replace the entire application with a compile time constant
gus_massa
·
The idea of using a file is to force the program to use that number as an unknown value at compile time.
igouy
·
command line arguments would be unknown at compile time.
Reply on news.ycombinator.com