Slashdot Mirror


Java SDK 1.5 'Tiger' Beta Finally Released

kingkola writes "Finally, after about two years of development, the Beta for Java SDK 1.5, aka Tiger, has been released. Features added in this edition include generics support, autoboxing of primitives, syntactic sugar for loops, enumerated types, variable arguments, sharing of memory between multiple VMs and a bunch of other bugfixes, enchancements, etc."

45 of 602 comments (clear)

  1. IPv6 for windows finally by goodbye_kitty · · Score: 5, Insightful

    Yay, finally some proper java support for IPv6 in windows. Im not an IPv6 zeaolot or anything but its great to be able to write (careful) java.net code using generic InetAddresses and be pretty sure that it will work regardless of which version of IP your network is using.

  2. Re:Why? by Jim_Hawkins · · Score: 5, Insightful

    It bothers me when I read statements like this. Maybe Java is slower than C -- it really depends on what you are doing with each language. For example, heavy duty graphics are not going to fly in Java. However, the portability that a language like Java has, the ease that it can be implemented and the support that it is gaining/has gained in the corporate world makes it a solid competitor.

    Every language out there has its own advantages and weakensses. C is fast. It is powerful. The gaming industry will probably always continue to use it unless something exceedingly better comes along.

    Java is stable. It is secure. It is very easy to code. Web developers and businesses looking to get multiple systems working together quickly and efficiently will continue to use that.

    I don't pretend to be an expert, but from what I've seen, Java is definitely a good thing to have around.

  3. Re:Too little, too late by jimbolaya · · Score: 4, Insightful
    C# was clearly inspired by Java, so if Java takes back a few ideas from C#, I say its fantastic. And recall that they each are based, in syntax, on C, and in concept, on Smalltalk. Language designers learn and borrow from each other. All is good in the world.

    That said, you do give C# much too much credit for "innovation." Microsoft may have a monopoly on a lot of things, but innovation ain't one of them.

    --

    There ain't no rules here; we're trying to accomplish something.

  4. Re:Too little, too late by LarsWestergren · · Score: 2, Insightful

    So, finally Java is finally catching up to C#.

    Eh, considering C# is pretty much a clone of Java, I wouldn't crow to loudly about being first.

    As for your specific points here, I think they illustrate that it is good that Java and C# are competing, both are striving to better themselves.

    As for the trollish tone of your post, why take this so seriously? You are not your programming language.

    --

    Being bitter is drinking poison and hoping someone else will die

  5. Re:Too little, too late by MSBob · · Score: 5, Insightful
    C# innovated this, and already has this in the spec

    Bollocks to that. C# copied generics from C++ (which likely copied it from somewhere else) and so did Java. And they both (C# and Java) got it wrong and missed the point.

    Java didn't have this before? LOL

    Lack of enumerated types in Java has been a real pain in the ass as was lack of typedef.

    Memory sharing between VMs is not so easy to do when you have umpteen platforms to support. Much easier when you have one like in .net.

    What .net lacks however is more substantial. There is no API in .net for doing O/R mapping such as JDO or CMP (belch). There is no API for distributed clustered components like EJB session beans. MSMQ is only usable in the Microsoft world. JMS queues can generally be used to integrate with legacy systems. Java has a bunch of great open source tools for it like Eclipse and all its plugins not to mention the Jakarta project. .net has bugger all for a developers' community, unless you consider Microsoft's astroturfing a vibrant community.

    Finally .net lacks real credibility in the enterprise. The company that I work for (biggest consulting shop in North America) has a strategy of using .net for quick several week hack jobs but the real projects are always done with J2EE.

    --
    Your pizza just the way you ought to have it.
  6. Re:"generics" by PhrostyMcByte · · Score: 5, Insightful

    The type checking is much weaker thus introducing new potential holes for error to slip through.

    In collections, generics make type checking much stronger. They allow you to find casting problems at compile time instead of run time by not boxing things to Object and back. This also gives a huge speed increase (about 300% in my tests).

  7. In Response to C#? by osewa77 · · Score: 5, Insightful

    When I first learnt Java, I was so excited about the write once read anywhere functionality but many language features (or the lack thereof?) simply bugged me. Then I discovered C# and was happy to have found a usable Java - until I saw the probs Mono is facing porting .NET, particularly System.Windows.Forms, to Unix ... and the fact that they would always have toplay catch up, with no big company to support them (IBM, Sun and other Linux/Open source backers already have a huge stake in Java)

    When I read about the proposed features for Java 1.5, I knew i could stick with Java for the long term. Good news!

  8. Re:Too little, too late by Anonymous Coward · · Score: 3, Insightful

    C# invented them? Are you sure?

    > > generics support
    > C# innovated this, and already has this in the spec

    C++ and Eiffel innovated this. Generics have been available for Java for *years* in this implementation ( http://www.cis.unisa.edu.au/~pizza/gj/ ). It just don't get accepted into Java right away. (BTW, Generics aren't currently part of C#, are they?)

    > > autoboxing of primitives
    > C# innovated this, already implemented years ago

    LISP, C, heck even PL/I implemented this years ago.

    > > syntactic sugar for loops
    > "foreach": C# innovated and already has this, implemented years ago

    Python, Basic, Smalltalk, and Perl did this years ago.

    > > enumerated types
    > Java didn't have this before? LOL

    The new enumerated types aren't simple integers, they're more like Ada enumerated types. They're objects that can be used in switch statements. variable arguments. BTW, enums aren't really needed for most programming as long as you have constants. Many high level languages (e.g. PHP, Python?) don't have enums and there's no strong demand for them.

    > > variable arguments
    > C# innovated and already has this ("params array" arguments)

    FORTH, LISP, and C had this for ages.

    > > sharing of memory between multiple VMs
    > C# already has this
    Actually, this is more to do with multiple implementation sharing loaded classes. Currently Java startup times are slow because classes aren't preloaded or shared as they are on the Microsoft J# and MacOSX Java platforms.

    > > and a bunch of other bugfixes, enchancements
    > Bugfixes in a language? WTF?

    Yes, bugfixes do happen. Oh, I forgot you live in the Microsoft world.....

    Seriously, why is it when when C# cherry-picks good features from Java, it's called innovation but when Java learns from other languages it's called playing catchup?

    Java has gone very far without these features and it still doesn't need them. They're fluff. The only feature that really needed to be added is the shared memory VMs since it'll solve the perception that Java is slow once and for all. The metadata feature is also nice, but it isn't really necessary. XDoclet had C#-like metadata for years (I believe before C# did). It just hasn't been recognized and officially integrated with the EJB spec.

  9. Re:About time too by Spoing · · Score: 2, Insightful
    1. How is java less lock-in than ,NET? Both are closed products with free alternatives. Java has Kaffe, lots of small jvm's and classpath - .NET has Mono.

    While in general I agree -- the core implementations of both are closed source -- the two are entirely different when motivations come around.

    Sun: Motivated to create a Java developer base and sell related goods on various platforms.

    Microsoft: Motivated to create a C# developer base and sell related goods on Microsoft platforms (Windows NT and Windows CE lines).

    While I don't entirely trust Sun, they have a much better history when it comes to trustworthyness.

    All that said, the .Gnu and Mono projects are damn important. They are also doing a difficult task on an unreliable (and fluid) 'standard'^.

    1. (^ - Standard sadly means "What's popular" to most people...they are wrong, though that's how they think of it. Ex: Windows and Word are 'standards'. )
    --
    A firewall can not protect you from yourself. Turn off what you do not need. Do not use the firewall to do your work.
  10. Sun Marketing? by Anonymous Coward · · Score: 1, Insightful


    " Someone in Suns marketing department should produce a massive wallchart detailing everything Java can do, every major solution for it and arrows showing how they all join together and then mail it out to every CEO / CTO in the country."

    Sun has a marketing department? Jeesh, its like saying Novell has a marketing department. This is one thing that companies need to really wake up and smell the coffee on. Although good products can sell themselves, they sell better with good marketing to entice the corporate types. Marketing is the reason why M$ is where it is today.

  11. Re:About time too by DrXym · · Score: 4, Insightful
    You're not locked in because there are multiple JVMs and multiple implentations spanning multiple architectures and devices from multiple vendors. You are not compelled to use Sun hardware, nor Sun software if you want to use something else. Many of the core technologies are open specifications with open source implementations.


    Thus you have a lot more choice. You could be using Java on Mac OS X, Tomcat and PostgreSQL to power your website, or you could be using IBM mainframes with WebLogic and an Oracle backend.


    With .NET your choices are made for you - Microsoft. Microsoft software on Microsoft operating systems on Microsoft supported platforms. Mono might be suitable for toy apps (not that Kaffe is much better) but it is never going to implement all of the proprietary things that .NET is comprised of.

  12. Rubbish. by warrax_666 · · Score: 3, Insightful
    The type checking is much weaker thus introducing new potential holes for error to slip through.

    No. Type checking is stronger because you can avoid type casts. (Note, I'm talking about generics in general, not the Java implementation which is slightly broken because of VM compatibility problems).


    You must make some assumptions about the used classes however verifying the correctness of these assumptions in nearly impossible.

    What the hell are you talking about? Be more specific.


    The reusabilty "argument" is rubbish: that's what we have already OOP for. And when you now claim performance problems due to heavy stack/virtual methods use: that's an issue of the processor design not of the programming language. When you think that running serious software on system compatible to 30 year old rubbish is cool, then you must accept the performance of 30 year old waste in the same turn.

    The lack of speed of virtual methods has NOTHING to do with processor technology. It is there because you MUST do a lookup at runtime (which there is absolutely no way to avoid). This will ALWAYS add overhead, regardless of processor technology. The only way to avoid this overhead while still having "reusability" is to have "compile-time virtual methods" (i.e. templates).

    The above mentioned problems create new security holes. That's why the use of generics/templates in strictly forbidden in e.g. the banking sector.

    Now you're talking pure nonsense. What security holes? Generics AVOID security holes because they avoid typecasts (invalid typecasts are one typical reason for security holes).

    Due to turing completeness of most template/generics systems the compiler is slowed down to 30 percent performance. More evil is that templates push the grammars into the Chomsky-0 type making secure (=100%) correctness checking impossible.

    Nonsense. Compilers are not slowed noticably down by generics in general. All functional programming languages support "generics" (type-variables is a more correct term), but the compiler for e.g. O'Caml is still as fast (or faster) than gcc is for C code. Compilers for C++ may be slower because of templates, but that's because the C++ templates are nothing more than macros with a little added type-checking (so the compilers usually have to compile lots and lots of extra code).


    In old languages like Lisps the use of generics is usually strongly discouraged to users unless they are ultra-gurus due to the bad experiences. It's not clear why this should be different for Java or C++.


    There is no such concept as "generics" in LISP -- since everything is dynamically typed generics are the default. If you're talking about macros, then some people may discourage them, but those people are idiots. Macros are the precise reason that the LISPs are so powerful.
    --
    HAND.
  13. Re:About time too by Glock27 · · Score: 5, Insightful
    How is java less lock-in than ,NET?

    Because Java has freely available, industrial strength implementations on dozens of platforms. If you use it, you aren't locked in to deploying on any particular OS or hardware. (BTW, don't forget gcj in your list of "free" alternatives.)

    .Nyet, on the other hand, leaves you with only Windows as a deployment option - it's not at all clear that Mono will be allowed to finish/distribute a complete cross-platform .Net implementation. Many important libraries aren't in the ECMA standards, such as Winforms.

    I hope that helped clear things up...

    --
    Galileo: "The Earth revolves around the Sun!"
    Score: -1 100% Flamebait
  14. Re:steps toward Python by ---- · · Score: 3, Insightful

    Have you tried jython?

    "Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform."

    This means you can even run python on a palm pilot or a cell phone.

    jython code can even be compiled into java bytecode (*.class files)

    /* ---- */

  15. Code is for reading as well as writing by gidds · · Score: 3, Insightful
    While all of these features make code easier to write, I'm not sure they all make it easier to read.

    I believe that overall, much more time is spent maintaining code than in writing it, and yet languages seem designed mainly for the latter. (Perl particularly!) Some of the changes -- new for() loops, generics -- will improve readability and maintainability too, but I worry that the new imports, and maybe enums, won't. At present, it's fairly easy to look at a small section of Java code and know exactly what it's doing. With no preprocessor, and nice easy scope rules, you can easily tell what names and objects are being used -- that's one of the things I really like about the language. Additional imports, not just of class names but of other identifiers, risks muddying this. Has anyone done much actual work in 1.5 and can speak from experience?

    --

    Ceterum censeo subscriptionem esse delendam.

  16. Re:Why? by Anonymous Coward · · Score: 1, Insightful

    Java as a memory hog?
    Yes, and without a lot of careful work this affects performance in real world medium and large size applicatins more than code execution speed.

    Shared memory helps?
    *Only if you run multiple programs simultaneously*
    What is really needed for single program performance is object structure changes so that commonly used things (GUI elements, datastructures, threads...) within a single program share and save memory or are allocated and reallocated from pools automatically. Generally, this is more imporatant on the client-side but each situation is different.

  17. Re:C is portable too by archeopterix · · Score: 2, Insightful
    It bothers me when Java's portability is extolled. C is portable too, to more platforms than Java is.
    C is portable only to some extent. Granted, it compiles everywhere, but it doesn't make your program run everywhere, because, unlike in Java there is no standard way of doing things like GUI, DB access, printing and such in C, so your Foo OS C program probably uses libraries that don't exist on the Bar OS.
  18. Where the value is by lonb · · Score: 5, Insightful
    While I see people here immediately start debating who gets credit for various aspects of the language and when things came out first -- in hopes of finding which originator is the more powerful geek (MS or SUN), I think the critical point is being missed.

    Microsoft has it REALLY easy, and is cut way too much slack, when it comes to development environments and languages. They control the operating system and the hardware specifications and compliance. And, they have done so for well over a decade.

    Java is truly platform independent, which is a huge challenge. That challenge was met with a well designed language that operated slowly. However, between 1.4 and 1.5 there are substantially speed increases in the VM which bring it up to par with the fastest languages available.

    When you think about developing applications you need to consider many things other than pure technology:
    - Who will be around in 5-10 years (both MS tech and Java tech will)
    - Access to developers (while MS is the clear winner in the US, this is not so in other countries, where even gov'ts are against MS)
    - Vendor independence and support (this is clearly in favor of Java)
    ..the list goes on.

    --
    "Ain't I a stinka..." - Bugs
  19. So, competition is good, huh? by ceeam · · Score: 2, Insightful

    I mean apparently some level of pressure from dotnet does show up... And that's good I think. Not that I like either of Java or C#... Both look too restrictive (without real benefits) and kinda old to me. I'm leaning more and more to move all the stuff I do to Python (i.e. where I may decide what to do it in, sigh). Slick, reliable, and just very nice to work with.

  20. Re:C is portable too by Dan-DAFC · · Score: 2, Insightful

    Java has binary portability (i.e. compile on Wintel and run that binary unchanged on Solaris), C's portability is at the source level (develop on Wintel recompile on Solaris). And even then it takes more discipline (not that programming discipline is a bad thing) to write portable C code than to write portable Java because of the abstractions you mention. If you want to write a program that interacts with the system at a low level then Java is the wrong tool for the job. JNI is awful. It gives you the disadvantages of Java combined with the disadvantages of C/C++. If you find yourself needing to use it you should reconsider your choice of development platform.

    --
    Suck figs.
  21. Are you talking about THAT Microsoft?!? by A+nonymous+Coward · · Score: 3, Insightful

    Their basic tactic has always been "embrace, extend, extinguish" - not "steal, sue, squash".

    You might want to talk to the many companies Microsoft has stolen from, notably Stac (I think was their name). Sue? Squash? Yep, sounds like Microsoft. You must be living in some weird dream world.

  22. Re:Why? by Surt · · Score: 2, Insightful

    Java is slow today in 2 main places:

    [] because array references are bounds checked, and if you do anything more than minimal array work your bounds wont get hoisted so you're screwed for performance. Maybe the 1.5 compiler will hoist more references, the 1.4 misses a lot of obvious opportunities. Also, there are some optimizations that can be done on 64-bit architectures, so hopefully this will at least get somewhat better in a couple of years. It would be nice if they added an unchecked keyword or something to let the programmer decide when they want bounds checking.

    Swing is pretty slow, and I don't see sun promoting any of the alternatives yet.

    --
    "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
  23. Re:C is portable too by teromajusa · · Score: 2, Insightful

    "That's only true for trivial applications."

    Thats an exageration. My company sells several non-trivial Java apps which are binary portable. While we've encountered some platform inconsistancies, particularly in networking, its been fairly trivial to find ways to make things work portably.

  24. Re:Same old same old by JohnnyCannuk · · Score: 2, Insightful

    Don't whine at Sun my friend...go the the HP site and get the JDK from them...they may have even released a 1.4 version by now...

    Oh BTW, since Sun itself only directly supports Linux Solaris and Windows with all of it's other software, you should not be surprised when they don't release a BETA on another platform. *BSD may be good, but Sun are not experts in *BSD. When The 1.5 SDK is final, I'm sure you will see a quick release to *BSD, jsut as there is a 1.4x fro *BSD now (actually maybe only NetBSD but there is one....).

    You see, unlike some other software giants, Sun will let other companies and organizations port Java to their platform at their own speed since they are the experts not them...

    --
    Never by hatred has hatred been appeased, only by kindness - the Buddha
  25. Re:Can we thank .NET for giving Sun a push? by Anonymous Coward · · Score: 1, Insightful
    WTF?

    • C++ templates work at the source level, Java Generics don't (they add casts to increase type safety)
    • Java Generics allow constraints on the types they
      are given, something C++ does not (at least not explicitely).


    murphee
  26. I like most of it... by mark-t · · Score: 3, Insightful
    But the autoboxing thing I just can't abide by.

    It's a convenience, to be sure, but it seems to me that autoboxing is a setup for programmers to make mistakes, as certain classes can get automatically and invisibly created, where before there would have been an error message issued by the compiler. Hopefully there's a command line switch to disable it so that the compiler can still catch those errors.

    Everything else in 1.5 I absolutely love.

  27. Re:C is portable too by Dan-DAFC · · Score: 3, Insightful

    Are you sure those different packages weren't just for ease of deployment (an .exe installer for Windows, RPM for Linux etc.)?

    I have never known an issue in a (100% pure) Java program that relates to what platform it was compiled on. What platform it executes on, certainly, but not on what platform the build was done on. The compiler either produces valid byte code or it doesn't. There's no issue such as byte code being valid on Windows but not on Solaris.

    If I compile with a 1.4 compiler on Windows it will run on a 1.4 VM on Windows, Solaris and Linux without recompilation. I may occasionally find that my threading or I/O behaves slightly differently because I haven't accounted for subtle differences inherent in the underlying OS (not as big an issue as when coding in a natively compiled language), but that's not because the byte code is not compatible across different platforms.

    --
    Suck figs.
  28. Re:SWT by harmonica · · Score: 4, Insightful

    I find it hard to imagine that anyone is still using Swing these days unless they are locked in to it,

    SWT doesn't come with a MVC approach as Swing does. Besides, you'll have to deallocate your GUI resources with SWT yourself.

    SWT is the future of Java GUIs

    That's a very bold prediction. SWT is a valid alternative in some cases. Before picking a GUI one should think a bit about which toolkit is best-suited for the job. But in no way is SWT always the right choice.

  29. Nice First Step, But.... by occamboy · · Score: 2, Insightful

    We recently switched from Java Servlet development to ASP.NET, and ASP.NET is MUCH faster to develop in. Yes, I know that we're locked in to MS OS and server, but given the incredible productivity increase, this is a small price to pay.

    All things being equal, I'd much prefer to stay away from MS. But ASP.NET is far too superior a way to go.

    It looks like the new Java release finally makes it roughly as good as C# (or Delphi, after which C# is modeled), but more is needed to for the Java world to be as efficient as the ASP.NET world:

    1. A good IDE. In ASP.NET, I can drop components on an HTML form, which bypasses a lot of HTML grief. The entire paradigm is easy-to-use and integrated. In Java, I need to use the comparatively awkward Eclipse or Forte IDEs, muck with Dreamweaver and whatnot - it's a productivity-destroyer.

    2. Servers that are not obtuse. I can get IIS to do anything in about 5 minutes. It takes hours or days to do anything in Tomcat or Resin and Apache. My time is precious.

    1. Re:Nice First Step, But.... by truthsearch · · Score: 4, Insightful

      Yes, I know that we're locked in to MS OS and server, but given the incredible productivity increase, this is a small price to pay.

      Vendor lock-in is never a small price to pay. From now on your project will be dependant on one and only one vendor, unless you're willing to completely re-write it from scratch one day. As IDEs evolve much quicker from every vendor except Microsoft, you'll be disappointed when you can't use the future version of Eclipse or JBuilder or whatever when it far surpasses Visual Studio. When a new useful free library pops up for Java, which happens all the time, you can't use it. You're stuck on a new platform with less features, less free tools, and less support for the foreseable future.

    2. Re:Nice First Step, But.... by thetoastman · · Score: 3, Insightful
      Yes, I know that we're locked in to MS OS and server, but given the incredible productivity increase, this is a small price to pay.

      As another person has already pointed out, this is never a small price to pay.


      From a technical point, you've tied your entire IS structure to one company. Your innovations, flexibility, and ability to create services for your environment will be dictated by a single company.


      From a business point of view, implementing business critical functions based on a single proprietary environment is always dangerous. In effect, you are entrusting a critical business function to an entity outside your zone of authority.


      If Microsoft decides to stop supporting .NET (or any particular technology), your IS infrastructure will have to be completely rewritten. In mainframe days, we called this the forklift upgrade approach. You drive in a forklift, hoist out the old mainframe, and replace it with a new mainframe.


      This is exactly the type of capital costs that distributed computing was designed to eliminate. By creating a proprietary single-vendor structure, you've recreated the inherent business and technical risks of single source mainframe computing.


      As far as soft dollar (productivity) costs, you've also placed yourself at significant risk. When (not if) the change comes, all of your IS department will have to be retrained. In addition, all of your user base will have to be retrained. This is a serious cost.


      The soft dollar cost risk does not end there. Since your field of expertise is narrower (restricted to one vendor's offerings), finding qualified people for senior positions becomes more difficult. This will inflate salary costs at the high end, increasing overall cost of ownership.


      To combat this potential salary issue, your company may resort to outside consultants, again placing critical business functionality outside your zone of authority. Your company many also decide that mid-level expertise is adequate, which means that you will not get the benefits of moving to a proprietary, single-source technology.


      Having programmed on MVS, UNIX (of all flavors), Windows, and the Macintosh, I realize that some of the IDE offerings for microcomputer platforms are pretty amazing. However, using an IDE is no excuse for not knowing the technology you are using.


      In short, if you understand the technology, then learning a tool is just that - learning another tool. I have my preferences in editors, IDEs, and tools (not trolling for an editor religious flamefest!!). However by understanding the technology behind the tools, my choice of tools is based on ergonomics and speed rather than all the technology assist that I potentially get.


      When another platform comes along, as I'm sure it will, I will be able to jump right in. By understanding the technology I can be a more flexible geek (gumby-geek?) and provide a better service. If I rely on a single-source proprietary environment, I will go the way a lot of PL/1 programmers went when the next wave of technology arrives.

  30. Re:Reality check by egomaniac · · Score: 4, Insightful

    Are you serious??
    You should try to do some netowrk programming, say for example real time analysis of netowrk packets, see if java can handle a gigabit network...I didnt think so.


    I work for Yahoo. Many of our web servers are powered by Java, and they're fast enough for us. Are you suggesting that your network performance needs are higher that frickin' Yahoo's?!?

    I do freely admit that we don't use Java for the super-high-volume stuff like My Yahoo and Mail. But we're Yahoo. Even our low-volume properties are high volume. Java is fast enough to serve a lot of purposes around here.

    --
    ZFS: because love is never having to say fsck
  31. Re:C is portable too by abigor · · Score: 2, Insightful

    C is portable all right - assuming you love the preprocessor.

    #ifdef SPARC ...
    #endif

    #ifdef X86 ...
    #endif ...and so on. Yuck.

  32. Re:About time too by Anonymous Coward · · Score: 2, Insightful

    I get the point how .NET developers would be screwed, but if Sun stopped distributing Java I could continue to use IBM's very high quality JVM, or BEA's JRockit, or Apple's OSX. No doubt one of the many others would quickly step up to fill the void. None of these can disappear at the hands of Sun. If .NET went away at the hands of Microsoft, it would likely disappear entirely because of its immaturity. Java, on the other hand, has reached the point where it could live on independently if necessary. If Sun or Microsoft stopped shipping a C++ compiler, the language would live on. Java has reached that point too.

  33. Re:steps toward Python by hobuddy · · Score: 3, Insightful

    Dynamic typing being a Good Thing depends on the context. Dynamic typing tends to move more bugs which could easily be caught at compile time to runtime. This means more testing needs to be done which actually drives up development costs and thus negates any benefit gained from "rapid development".

    Indeed, I find that writing test suites saps much of the development speed advantage I gain from using a dynamically typed language.

    However, using a soundly designed dynamic language, I can write dynamic-implementation+test-suite in about the same time I could write only static-implementation in, say, Java. But since I have an extensive test suite, I end up with much more reliable code.

    --
    Erlang.org: wow
  34. Re:steps toward Python by NumbThumb · · Score: 2, Insightful

    The point is that the typechecking in Python is done at runtime (obviously). Having to *declare* the types of all variables/members/parameters allows to check for correct types without having to write test-cases that cover *every* possible path of execution (which, in general, is impossible anyway, especially if lambda-statements are involved).

    Forcing programs to be type-save weeds out a lot of potential bugs beforehand. And it makes reading the code a lot easier.

    --
    I have discovered a truly remarkable sig which this 120 chars is too small to contain.
  35. Re:not enough by jjohnson · · Score: 2, Insightful

    Sun wasn't working on the language because they were busy building up the libraries--arguably a better choice. Instead of generics and autoboxing, we have J2EE, which (in the right parts) is probably a larger productivity gain. One place Java still has a huge advantage over ASP.NET is the size of the standard libraries/APIs.

    --
    Anyone who loves or hates any language, platform, or manufacturer, doesn't know what they're talking about.
  36. Re:Just a Question for everybody: by jilles · · Score: 4, Insightful

    Absolutely, competition is good. On the other hand I think Java itself was a good motivation for developing .Net. I don't think MS would have been as eager to put development and research resources into it otherwise.

    This is what competition is about. MS already has C# 2.0 designed (which sports many of the features introduced/present in jdk1.5) and no doubt they'll start marketing that in a couple of months. It's a technological arms race. Of course the big question is which of the two will make the first move to support the other. My guess is that they will let IBM do the hard work. Already there is some .Net support in eclipse.

    --

    Jilles
  37. Re:not enough by Featureless · · Score: 3, Insightful

    I can understand and respect a firm position on open standards and non-proprietary technologies, and that's fine for some folks. On the other hand, I have no problem with Java's licensing or ownership encumberances, and I know I am not alone. The source is open enough that crucial problems, even in the VM, can be fixed by me (rather than begging and whining and being ignored for years, or writing ugly workarounds). In practice I have no issues at all. Certainly, Java compares favorably to things like .Net on this score.

    Some thoughts:

    Java genericity has no special support in the runtime, which limits the type safety it can provide.

    True.

    Generics over primitive types are boxed, meaning they are inefficient.

    Collections were already boxing primitives. How often do you think this will come up for you in the real world? Can you come up with a convincing example?

    Java's native code interface is still inefficient and complex.

    Funny, I've used it for a few different things (in 1.4) and never found it to be either. But perhaps if you made a more specific complaint...

    Java still lacks value classes and operator overloading, making it a poor choice for applications involving numerics or graphics.

    Pardon my ignorance about value classes; I'm wondering if you can be more specific about when they're really useful and what benefits they have for numerics or graphics?

    And finally, when you say operator overloading, you lose me. My opinion of operator overloading is that it is absolutely bad. Let me be clear. It is always bad, under any circumstances, when used for any reason. It has exactly zero functional value, and, as opposed to other kinds of "syntactic sugar" it has a tendency to make code where it is used with any frequency into a confusing, unmaintainable minefield. When advocating for operator overloading you are basically advocating a programming style with 1 letter method names, only it's worse, because you're limited to a few "commonly used" letters.

  38. "Java 2" product name by Eric+Smith · · Score: 2, Insightful
    So why isn't this "Java 3"? There are more significant enhancements between Java 2 1.4.0 and this new 1.5.0 than there were between Java and Java 2 (1.1.8 and 1.2, if memory serves).

    Of course, IMNSHO the whole "Java 2" name was just marketing run amuck. I don't see how it's done anything but cause confusion. If marketing absolutely insisted on having a "Java 2", engineering should have bumped the version number to 2.0.

    I'm not a fan of marketing determining version or release numbers, nor version number inflation, but changing a marketing product name to include something that looks like a version number without having it match the actual engineering version number is obviously bad.

  39. operator overloading by NoOneInParticular · · Score: 2, Insightful
    The grandparent was talking about numeric and operator overloading. It is completely beyond me that a modern language like java does not have one of (a) native numeric libraries or (b) operator overloading to create your own. Have you any idea what an unmaintable mess it makes to be forced to use a lisp style syntax instead of math, or even more errorprone and a hassle, write all the loops by hand?

    In many languages nowadays, be it fortran, c++, perl, python, etc. etc. etc. it is possible to use straight math operators on arrays or matrices, which has a clear and concise syntax that everybody that learned math understands. This cuts down on the code to write, the formula is clear and can actually be looked up in the original paper if you care, and, the libraries are usually pretty well optimized. Compare this with java, where, if you use a matrix library, you get some cooked up API that doesn't resemble the way you think about arrays of numbers at all.

    Okay, as you seem to claim that operator overloading is absolutely bad always, please explain why:

    matrix c = a + b - c;

    is bad, and

    String c = a + b;

    is considered acceptable? Hell, the addition operator on strings isn't even associative.

  40. Re:Java 3.0 by egomaniac · · Score: 2, Insightful

    Just skip this and program in much better JVM based languages than Java:

    Admittedly, I didn't even bother to look at either of the languages you point to, but it's irrelevant. Here in the real world, popularity matters. You could be using the best damned programming language in the entire world, and if you're the only one using it, good luck finding a job.

    I'm not saying that we should hold back progress. If these languages are really better than Java, then by all means support them and encourage people to adopt them. That's not where you're wrong. Where you're wrong is saying that people should "skip" Java for these languages. That is, quite simply, insane, at least if you're trying to program for a living.

    --
    ZFS: because love is never having to say fsck
  41. Pain in the ass to download by Peter+Cooper · · Score: 2, Insightful

    My beef with Java is that the Sun SDKs are such a pain in the ass to download from a command prompt.

    They use some extremely arcane methods to make sure you have to agree to their licence (which is fair enough) but then once you've started downloading, you can't pause and resume! I even tried their stupid download manager, and it couldn't deal with it.

    For those of us on modems (and have ISPs who boot us off every 2 hours to avoid hogging), this is really annoying. I had to get a friend with broadband to download it, then upload it to my FTP server.. so I can stand a chance of downloading it properly!

  42. Re:About time too by DrXym · · Score: 2, Insightful
    But what is .NET? Show me where .NET (in the CLR / C# sense) finishes and SQL Server .NET begins. Is it in ADO.NET or what? If you don't know, what chance does some clueless manager?

    All they hear at the seminar is that ".NET has a portable runtime just like Java and offers an end to end solution". And then the brain disengages without detecting the ambiguity. How many ask for clarification - the runtime might be portable but has it been ported and what about the rest, is that portable and ported too? Of course any company switching over might learn their mistake when it is far too late to correct. This premise also presumes Java needs replacing when it rarely does for any reason, especially not to another runtime language.

    Even the client side stuff in .NET like the Forms demonstrates there is no portability there. Look at the hoops that the Mono folks have to do to support it - linking to Wine no less. In other words, to implement Forms (and PInvoke) you have to emulate an entire Win32 API!

    And there is the constant threat of harrassment hanging over the project if ever it gets too good for Microsoft's liking.

    This is why I think mono is wasting its time really pursuing .NET libs. Support for semi-core libs such as Forms might be okay but draw a line in the sand. Offer a viable alternative in GTK# and other open technologies which give people no reason to use windows.forms. Better yet, implement plugins for Eclipse which make it easy to visually design and build apps for GTK# that run on any platform.

    After all, DevStudio used to be a premier development platform but these days it is looking distinctly ropey especially for the fortune it costs. With a bit of coaxing Eclipse could do everything DevStudio offers but with the added benefit that the code it produces truly runs anywhere

  43. Catching up to Common Lisp? by jwr · · Score: 2, Insightful

    That's funny -- it seems that in another 4-6 years the language features of Java will approach those of Common Lisp.

    The main difference being that CL is standardised and thus isn't a moving target -- you don't have to worry about the language changing from under you every once in a while. You can concentrate on your libraries and applications.