Live data from Hacker News

0xCAFEBABE & 0xFEEDFACE (2003)

radio-weblogs.com

11–20 of 126 posts

Re: 0xCAFEBABE & 0xFEEDFACE (2003)

#11

Rust will yell at you if you use specific magic numbers like these edit: yes, 0xCAFEBABE is a warning but 0xFEEDFACE is not: 3405691582 https://github.com/rust-lang/rust/blob/d0ea1d767925d53b2230e...

This is only for rustc, not for arbitrary rust programs.

Re: 0xCAFEBABE & 0xFEEDFACE (2003)

#12
post #9
post #4

0xDDDB00B5

That's a Code of Conduct violation. It's not the 90s anymore, there's no quarter for this type of thing in modern development teams. Rust's style checker even flags up the use problematic magic numbers.

This is only for rustc, not for arbitrary rust programs.

Re: 0xCAFEBABE & 0xFEEDFACE (2003)

#13

Rust will yell at you if you use specific magic numbers like these edit: yes, 0xCAFEBABE is a warning but 0xFEEDFACE is not: 3405691582 https://github.com/rust-lang/rust/blob/d0ea1d767925d53b2230e...

That says all I need to know about the community.

Re: 0xCAFEBABE & 0xFEEDFACE (2003)

#18

Rust will yell at you if you use specific magic numbers like these edit: yes, 0xCAFEBABE is a warning but 0xFEEDFACE is not: 3405691582 https://github.com/rust-lang/rust/blob/d0ea1d767925d53b2230e...

But why?

It's a mystery, lost to the sands of time. IMO, it's highly unlikely anyone will ever discover why the maintainers of the Rust compiler decided to lint their codebase for a dozen or so magic numbers.

Re: 0xCAFEBABE & 0xFEEDFACE (2003)

#19

Rust will yell at you if you use specific magic numbers like these edit: yes, 0xCAFEBABE is a warning but 0xFEEDFACE is not: 3405691582 https://github.com/rust-lang/rust/blob/d0ea1d767925d53b2230e...

Kind of low-key hilarious that someone thought this was a serious enough issue to actually submit that code. I wonder if there is a written spec that helps to judge which integers should be considered "problematic" and which ones aren't.
Post reply on HN