Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
cgh
2 days ago
|
parent
|
context
|
favorite
| on:
Programming language speed comparison using Leibni...
Zig could include the file at compile-time with @embedFile.
Twirrim
2 days ago
|
next
[–]
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.
reply
AndyKelley
2 days ago
|
prev
|
next
[–]
this would provide the optimizer the unfair chance to replace the entire application with a compile time constant
reply
gus_massa
2 days ago
|
prev
[–]
The idea of using a file is to force the program to use that number as an unknown value at compile time.
reply
igouy
2 days ago
|
parent
[–]
command line arguments would be unknown at compile time.
reply
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: