Sunday, May 04, 2003


Type as a test. 

Bruce Eckel chimes in on the Static vs Dynamic Typing debate.  He writes in "Strong Typing vs Strong Testing":

That is to say, if a program compiles in a strong, statically typed language, it just means that it has passed some tests. It means that the syntax is guaranteed to be correct (Python checks syntax at compile time, as well. It just doesn't have as many syntax contraints). But there's no guarantee of correctness just because the compiler passes your code. If your code seems to run, that's also no guarantee of correctness.

This implies that typing is a weak test of a program.  I believe typing is a pretty strong test of a program -- highly typed languages/programs have a real tendency to work well early in the cycle.  Part of the reason is the additional thought that must go into structuring such a thing...it just takes more effort.

Dynamic languages tend to be well-suited to problems that are adaptive in nature -- problems that require the program to deal with fluid data.  Static typing languages tend to be good at well-defined problems where the domain is well defined.

The fluid data world ends up being mostly handled by interpretation anyway.

As far as Java goes, sometimes we forget that Java is an interpreted language.  Yes, JITs are great, but they are actually just very cool interpreters.  The Java VM is doing a lot of work under the hood to be a good, fast interpreter.


1:06:30 PM    

Venus Sock Trap.

From the past, a little dusty...

I groped around in the dark, hard flat wood beneath me, then I realized I could open my eyes. Something in this room was strange, and the pet psychic within me decided that it that the closet over there was in on it. A baleful red glow traced the outline of the fateful closet, hinges to hinges, as if there was pressure inside, pressure that had a meaning. Will departed. I opened the door. I needed to be on the ground, that much I knew, so to my knees, to my stomach, to the supine I made my peace. A wiggle forward, across the floor, into the dust and the debris. Push away the things that don't matter, I told myself. Then I saw the first one. Simple, white, plain...a kind I had seen before but perhaps, perhaps, I hadn't expected to see here...this one was easy to match, and not worth much at the marketplace. Stomach push me forward...find me farther inside. Can I be this far inside? A second, this one black, and no better than the first, but to find two? Two -- my heart quickened. Inside the closet, on the ground, I lay feeling density surround me. The corner pitched a tiny glow in my direction, and I knew there was something there that should not have been. Stomach push me forward...and I find there is a small hole. The small hole gets bigger as I get closer, and there, in the dimly lit tunnel, I see what I have perhaps been looking for, many years, and wondering where they have all gone. I wriggle closer, inside, knowing that this is it, and here I can find completeness...black with stripes, blue with patterns, strange colors...one of each, and the other who knows where. So many missing parts, and I must know where they all are. I push farther into the hole, and the gentle constriction of the fabric surrounds me as the sock tunnel narrows. This deep inside I feel the comfort of restricted movement and restricted possibilities, and must know more. Deeper the tangling becomes comfortable and warm, and there is no need to return now, no way to back out, and why would I, when all the socks in the world find their completion here. It is warm, there are no decisions, and socks don't bite.

Venus sock trap.


12:31:14 AM