News for hackers. Stuff that matters.
Re:The Little Bool of Doom (2025) by netburst on Sunday February 08, 2026 @06:35PM (#46939737)
Since you mention Go, it does offer precisely the feature you describe in the form of build constraints. A file starting with

  //go:build go1.18
tells the toolchain to use Go 1.18. A slightly different syntax was used prior to Go 1.17 but the feature itself has existed since Go 1.0.
Re:The Little Bool of Doom (2025) by fl0ki on Friday February 13, 2026 @03:00PM (#47007050)
You also have the directive in go.mod which sets this for the entire module, which is very similar to the Rust edition approach, but each Go version is a small "edition".