cellio: (embla)
[personal profile] cellio
Java compilations are much, much faster than C++ ones were. I must remember this when I get impatient.

One lane of the Boulevard of the Allies has been closed for a couple weeks due to construction. It's only closed for a block, and generally it doesn't hinder traffic flow. Today, however, traffic was crawling there, and I have no idea why. What, did last night's spectacular storm cause drivers to be afraid of puddles or something? Sheesh.

The storm was quite loud and bright last night. I think I jolted awake from proximate thunderclaps at least three times. This made the cats who were sleeping on/near me unhappy, but it wasn't exactly under my control. This morning it seemed to have cooled things down and sucked some of the humidity out of the air, though the effect apparently didn't last. (I haven't been out since morning.)

Sharon and Elliott have a new cat. It's shaped like a Siamese, but it's all white. Elliott told me that because it has green eyes it is an "Oriental Shorthair"; if, instead, it had blue eyes, it would be an "Unpointed Siamese". Eye color is a defining characteristic of the breed but pointing is not? I didn't know that.

(no subject)

Date: 2003-07-10 05:35 pm (UTC)
jducoeur: (Default)
From: [personal profile] jducoeur
Makefiles usually aren't the culprit with C++. The problem is that files largely relate to each other through lexical inclusion, and there's a very strong tendency for headers to include other headers. So changing *anything* in a header file (which in an ordinary C++ project is necessary for even the average small change) causes several files to rebuild, and a file that's nested can cause whole libraries to rebuild.

Worse, the way linkage works in C++, it's very easy to wind up with obscene link dependencies, so that changing a class in one library forces the entire universe to relink. On a big project, that can be even worse than the recompiles.

The way you avoid this is by rigorous interface/implementation separation. You divide the project down into sensible libraries, and with a few exceptions you allow these libraries to *only* speak to each other through interfaces. The result is that you get neither recompile problem -- interface headers usually don't nest like concrete class ones do, and if properly written they don't introduce link dependencies.

The problem, though, is that you have to introduce that discipline when you're designing the project, and be absolutely religious about it from them on. It's worth doing (like I said, it usually results in far cleaner code as a side-effect), but most folks aren't willing to go to the effort...

(Yes, I'm an engineering design nerd...)

Expand Cut Tags

No cut tags