Spiral Dive
|
|
Saturday, November 30, 2002 |
|
|
Friday, November 29, 2002 |
Blocks vs. FunctionsThere's been a bit of writing on blocks lately. I think blocks are cool, but I'd much rather see a more general purpose functional construct added to Java. In functional languages you have the notion of a thing that returns a value of a given type. This is really handy for doing, well, just about everything. It's desperately missing from Java. When creating a new function inline we will really want to have the context that surrounds the function available to us. What is the best behavior to have here? The only thing I can think of that will really work is to provide a copy of the functions context. Can we really have the function block doing things that will modify the context it comes from? That's a pretty big can of worms. A copy means that we don't have to worry too much about it. Or, we can just check for the variables that are actually used by the inline function, and make sure those are initialized correctly. A change to any of those variables is not reflected in the surrounding environment.
3:43:43 PM |
|
|
Thursday, November 28, 2002 |
My Java.Since everyone seems to be putting out their wish lists for Java, I thought I'd contribute mine. It's pretty short, though. First, I'd like to see simple enumerations and sets, a la Pascal. Pascal is one of the most readable languages for a reason -- its enumerations and sets are a big part of that. Why modern languages have become so miminal is beyond me. There are some things that are just extremely general and useful. They shouldn't be removed simply because we can find another way to do them. Next, let's get first class functions (or blocks) into the language. I've see at least one proposal floating around for that, but I'd have to say that I didn't really like it. It confused function calling notation with block calling. There's probably a better way. I'd like to see the VM pushed strongly in the direction of being more language independent. The CLR has a big advantage in this area -- Sun really needs to get it together here. We should be able to construct IDEs that do just what is done with .NET -- multiple languages can be plugged in and used with a common toolset. I'd like to see aspects or their equivalent built into the language. Any sufficiently complex application will end up writing its own versions of crosscutted functionality. We might as well have it in the language. Yes, it's overkill for the little programs. So what. It won't be for long. |
|
|
Wednesday, November 27, 2002 |
|
|
Monday, November 25, 2002 |
|
|
Sunday, November 24, 2002 |
|
|
Saturday, November 23, 2002 |
Saturday Morning.Let the arguments begin! The only time the senior folks in the company can get together and have a proper product discussion is this morning. Tedious but necessary... 11:06:43 AM |
|
|
Friday, November 22, 2002 |
|
|
Thursday, November 21, 2002 |
|
|
Wednesday, November 20, 2002 |
|
|
Tuesday, November 19, 2002 |
Non-OO is what I've been thinking about for quite a while. But OO models do some pretty interesting things for us, and we don't necessarily want to lose that. The key thing I've realized is that object models provide good design-time flexibility, but provide very poor runtime flexibility. The neat thing is, OO breaks down cleanly into statements. Remember LISP? Prolog? CLIPS? That, my friend, is the wave of the future. Tuples (or statements) are such clean, interesting things. They're easy to move around a distributed system. It's easy to construct just about any kind of metamodel you want. You can easily run multiple metamodels in parallel. In short, it's the flexibility that we've always wanted. The downside is exactly the same as the upside: Flexibility. It's almost too easy to do too much. And it can get confusing. When does something really mean something? Where does the data end and the model begin? Just like in LISP, where the program is the data is the program. 8:34:49 PM |