Geek Speak — HabitableZone

Geek Speak » in reply to I'd call that a nerd myself.... :)

Never heard of Jython

I don't pay much attention to Java any more, truth to tell. In fact, my thinking over the last few months has evolved to where I consider OOP's time to be nearly over, and we need a better programming paradigm. JavaScript turns out to have unexpected strengths once you stop trying to force it to be OOP, because JavaScript really isn't an OOP language, it's a very obliging mimic. You can emulate OOP and other paradigms, and invent your own with it. JavaScript is only beginning to take off.

I also think compilers may become a thing of the past. When you think about it, compilation is a way to squeeze the maximum power out of wimpy computers, which really mattered once upon a time. But now that we have tons of computer power, interpreters run circles around compilers. I routinely commit the once-unforgivable sin of writing self-modifying code, and achieve efficiencies you just can't get with the rigid output of a compiler. There are plenty of ways to make JavaScript behave like a compiler, so I get the best of both worlds.

It's not soup yet, but one of these days I need to write a white paper on "Fractal OOP", which I think is a better OOP. The short summary is that instead of chopping the application data into tiny pieces, hiding it inside software objects, and then laboriously wiring the software components back together to recreate the original structure of the data, you leave the data in its native form, which is usually hierarchical (reality is fractal, and the data is supposed to model reality, right?), and selectively attach bits of software to the data as required. The results I've gotten are remarkable: My server-side page generator built on Fractal OOP spits out pages twice as fast, and similar redesign of my browser-side JavaScript reduced the size of the script by a factor of three. Small scripts really matter, since fat scripts can increase site download times to the point where browsers on dialup time out and can't connect. (The site I upgraded is MSM Photography. The level of complexity is roughly equal to the Zone interface, but it loads a heck of a lot faster.)

It's all due to JavaScript's amazing strengths, which I only began to discover once I stopped trying to force it to be "Java-lite" or an inferior form of C++. I use it on the server as well as the browser, which may freak out some people, but because I've found a more efficient way to program in JS, I think my server-side scripts now outperform my older VBScript ASP scripts. And about half my code runs equally well on either the server or in a browser--now that is code reuse!

Log in or register to post.

The whole thread (17 posts)