
The compiler flag that time forgot - sp332
http://www.mistys-internet.website/blog/blog/2013/10/19/no-cpp-precomp-the-compiler-flag-that-time-forgot/
======
ars
This kind of stuff is so common.

For example closing <br /> with HTML, or using HTML comment marks with
Javascript in SCRIPT tags.

People just copy what other people have done, without trying to understand
each part of it, so you have stuff that is just blindly copied from person to
person to person until someone finally stops and says "What does this actually
do?"

~~~
samspot
That closing slash was never really required. Sure your xhtml won't validate,
but it probably wasn't going to anyway. xhtml was recommended in my formative
years and I never really broke that habit. I still think input, img, br 'look
better' this way. If I am not mistaken, it's not even that it's wrong. I
suppose it's a waste of bytes though.

~~~
ars
When I see programmers add useless things that do nothing I wonder about their
level of knowledge. Do they know it does nothing and are adding it for looks?
Or are they poor programmers who can only program by copy paste?

Some things are obviously looks (useful looks, but still not required) -
indents in C, or semi-colon in Javascript.

Other things are not. You say that the slash is just for the look, but since
that's a rare position, I would advise not doing that - it makes you look bad
to other programmers. Especially because unlike my other examples the slash
has no useful purpose at all.

~~~
Swizec
> semi-colon in Javascript.

Nitpick, but that is required. The heuristic that places it for you is meant
as an aide if you accidentally forget to add it. And it's not always right.

Linters will also flag your code when you don't include semicolons.

As for <br> vs. <br/>. I personally prefer <br/> because of consistency. Just
like I'd write <img .. />, <link .. /> and so on.

~~~
ars
You should not write <img /> or <link /> either - so yes consistency, just not
in the way you said.

And the one tag that has to be closed with no content: <script type=".."
src=".."></script> can't be self closed anyway.

Self closing tags have no place in HTML.

~~~
cardiffspaceman
The HTML5 spec has two things: an XML serialization specification, and a
detailed non-XML parsing specification that makes the parser safely accept the
evil slash on void elements like BR and IMG. Bonus: it also accepts the
alternate spelling of the name of the IMG element.

A style guide, of course, could ban using IMAGE as the name of the IMG element
or any other infelicity, whether it is legal or merely tolerated.

~~~
userbinator
_the alternate spelling of the name of the IMG element_

I remember that jumped out at me when I read the HTML5 parsing spec, and I had
no success whatsoever finding more information about it (try Googling
"<image>"); do you have any links on how it came into existence? Or even
better, a site that actually does this?

~~~
cardiffspaceman
Fhars has the numbers involved, and you can search the mailing list on this.
What I remember is, Ian Hixie was spec editor and was then working at Google.
He would do bigtable queries over "all the HTML pages in the world" in some
sense, and find out things like that so many million pages had IMAGE tags. So
he would float to the list that it should be handled as a matter of
robustness. And most of the time those queries would be inspired by someone's
suggestion, although I think he had gone ahead and tabulated a frequency
table. This way you could judge whether potential new element names would
clash with mistakes authors were already making.

------
carussell
Related: Poul-Henning Kamp's "A Generation Lost in the Bazaar"[1] and the
discussion of it on HN [2][3].

1\.
[https://queue.acm.org/detail.cfm?id=2349257](https://queue.acm.org/detail.cfm?id=2349257)

2\.
[https://news.ycombinator.com/item?id=4407188](https://news.ycombinator.com/item?id=4407188)

3\.
[https://news.ycombinator.com/item?id=8812724](https://news.ycombinator.com/item?id=8812724)

~~~
mturmon
Irresistible:

"That is the sorry reality of the bazaar Raymond praised in his book: a pile
of old festering hacks, endlessly copied and pasted by a clueless generation
of IT "professionals" who wouldn't recognize sound IT architecture if you hit
them over the head with it. It is hard to believe today, but under this
embarrassing mess lies the ruins of the beautiful cathedral of Unix,
deservedly famous for its simplicity of design, its economy of features, and
its elegance of execution. (Sic transit gloria mundi, etc.)"

~~~
pyre
The real problem is that in "business" instead of the bazaar, you often don't
have the time to design something the "right" way because of "business
requirements," so you end up in the same mess.

------
jobu
Wow. Blast from the past. I remember being so thrilled when gcc finally added
support for precompiled headers. The compile times for the program went from
hours to minutes on the same hardware.

------
minikites
> Now that GCC 4.8 builds on Tiger

People are still using OS X 10.4? I thought I was the only one. (Tiger still
boots the Classic Environment on PPC Macs.)

------
merrua
Blast from the past. I remember being taught to include that in 2001

------
beowulfey
What would have made the error pop up, I wonder? It's interesting that it
didn't show up in gcc-4.0, and I doubt she requested that flag personally...

~~~
TorKlingberg
The ncurses makefiles probably sends the flag to GCC when building on OS X,
and while gcc-4.0 ignored this flag, gcc-4.8 gives an error.

