Hacker News new | ask | show | jobs
by B8MGHCBekDuRi 1221 days ago
2. : are we at the kindergarten?

what's wrong with 0xB00B135 ?

and why 0xCAFED00D? if this is a reference to something I don't get it and probably it shouldn't be there if it's not so popular that anybody knows about it.

the best I could find about it is "("cafe dude") is used by Java as a magic number for their pack200 compression."

Am I missing something here?

Why a compiler cares about this stuff?

1 comments

I'm not on the compiler team, so I can't answer why specifically. But if you look at the code, here's what it itself says:

  err("Don't use magic numbers that spell things (consider 0x12345678)");
How about, I am non native English speaker, those are perfectly valid numbers for me, so don't shove your limited view of the World down my throat?

How about some magic words spell things and you can't change that?

Java classes start with 0xCAFEBABE whether we like it or not.

Do

  0xF1CA
  
  0xF355A

  0xFA770
mean anything to you?
Once again, I'm not involved in any way, so my opinion is irrelevant.

But sure: I don't know Italian slang. However, a project that conducts both itself and its examples in English not being comprehensive about possible meanings in other languages isn't exactly a gotcha. Furthermore, the example is suggesting that you don't pick at random, but instead something that is obviously not a word, like 0x12345678. It's not suggesting that you make something up.

Furthermore, this isn't something about trying to be "absolutely pure" or something. It's a helpful lint to catch common cases. Nothing more, nothing less.