Registered: Jan, 2008
Re: Does Anyone Really Care About Desktop Java?
Posted: Jul 21, 2008 2:07 AM
> It's all a matter of opinion and experience, I suppose,
> to be rather more advanced than Java 5 in many ways. It
> already has closures, for example.
I won't argue against closures. Java needs them yesterday. But ActionScript carries with it soooo much baggage that what little it brings to the table is just not nearly enough. For example, the fact that it still does not even have block scoping is... well... enough said.
> And yes, it does have optional static typing. Typically
> you'll want to statically type everything you can
> because the development environment can then do code
> hinting and the compiler can generate better code. But
> when you need the flexibility of a dynamic language.
> ... you can suspend the static typing just when you need
Just when is that exactly? Does everyone on your team and dependent teams share the exact same frame of mind? And what about the other guy? And the other guy? Unless you and your team are operating in some kind of hive mind, your code is fubarred esp. with respect to any kind of static analysis. Most notable is refactoring tools, which are paramount to maintaining and advancing a medium to large codebase. I suppose if you don't have high caliber refactoring tools, you don't have this problem, but then I would have to question your claim that ActionScript is more productive. I for one could not imagine working on medium/large systems without good tools (I'm currently using IntelliJ IDEA 7).
> Of course, if you're convinced that the only way to
> guarantee properly working programs is by using a
> statically typed language, then I doubt I can change
> your mind with words.
A static type system is much less about "guaranteeing a properly working program" and much more about providing foundation for tools that help you build programs. Without static typing you are without determinism. Without determinism you are without reliable tools. Thus without static typing you are without reliable tools. I could live without tools for little stuff. I've done it enough in a previous life to know where the drop begins and it's not too far off shore.
> Myself, I had to have direct experience before I came to
> believe that it is possible to have higher productivity
> even without the seeming guarantees of correctness
> promised by static languages.
Again the guarantees are not about "correctness" per se. The primary benefit is the ability of tools to extract information from code deterministically. Code completion, code navigation, refactoring, and the like. Maybe you've never worked at length with tools like IDEA? I thought I knew everything about productivity before I started working with my current employer 6+ years ago. Then I reluctantly started using IDEA; my coworkers were stoked about it. I've never looked back. I would probably be singing your praises had I stuck with my old habits.
> That said, I have seen numerous situations where Java
> appears not to be the right solution. But it's clearly
> the right solution for you and many others.
Well, I'll be the first to argue that Java is *not* the right solution. It happens to be the best solution for large projects for the time being (imo). For instance, I would kill to use C# 3.x if it were a JVM language. In fact C# or something very very close to it is something that we should all be screaming for regarding Java's future. With heavy use of type inference and proper closures it has most of the benefits of a dynamic language, but all with a solid static type system and way more.
Unfortunately Java seems to be taking a the Spruce Goose approach to language design. The BGGA closures proposal is the latest folly. But, hey, what am I whining about; we're building our own language, coming this fall to a website near you. And then I'll be at the other end of the criticism...