Slashdot Mirror


Beyond Java

Anml4ixoye writes "I recently got sent a copy of Bruce Tate's newest book Beyond Java - A Glimpse at the Future of Programming Languages. Having read Bruce's Bitter Java and Better, Faster, Lighter Java, I was intrigued to see what he would have to say about moving beyond Java. In short: If you're a hard-core Java (or to a lesser extent, C#) developer who thinks Ruby is something that goes on a ring, Pythons will bite you, and Smalltalk is something you have to do at parties, you are in for a rude awakening." Read the rest of Cory's review. Beyond Java: A Glimpse at the Future of Programming Languages author Bruce A. Tate pages 185 publisher O'Reilly rating 9 reviewer Cory Foy ISBN 0-596-10094-9 summary Excellent book for Java developers who haven't been exploring what else is out there

Let's get down to it. For many people, Java pays the bills. For dealing with big problems, it is a wonderful language with a myriad of libraries for solving domain-specific problems. The author thinks that this focus on the larger applications is causing Java to alienate the developers who need solutions to small, real-world problems, like babysitting a database with a web site.

Bruce starts out in Chapter 1 discussing a disrupting experience he recently had when he discovered how much faster and more productive he and his team were when they switched mid-stream to Ruby on Rails. He gives some controversial numbers that discuss this improvement. This experience leads him to realize that maybe Java is dying - or at least fading in certain areas.

His next sections (Chapters 2 and 3) discusses the "Perfect Storm" that led Java to become the leader it is today. How it traded the OO purity of Smalltalk to woo C++ developers. And how the programming environment was calling out for a language like it.

But that landscape is changing, and Java is having a hard time keeping up. In chapter 4, he gives an example of servlets. Earlier servlet specs allowed you to get a Hello, World servlet, albeit ugly, up rather quickly. That same example now requires deployment descriptors, packaging into WAR files, configuration files, etc, etc. For Java developers, this is the norm, but for a developer new to Java, who wants to learn all that?

Chapter 5 is a discussion of what Bruce feels is the Rules of the Game, or what the next "Killer language" will need in order to beat out Java. This was a very good treatment, highlighting some of the good and bad of Java and languages as a whole. For example, he rates high that you will need some sort of Enterprise Integration, Internet Focus, and Interoperability. He also feels things like dynamic typing, rapid feedback loops and dynamic class models (making reflection more natural).

Most importantly, it needs a killer app to act as a catalyst to get people's mindsets changed. In Chapters 6, 7 and 8, he gives examples of some killer apps - Ruby on Rails and Smalltalk's Continuation servers (like Seaside). Chapter 6 is a kick-in-the-teeth intro to Ruby (which left me wanting to go out and pick up Dave Thomas' Programming Ruby book). Chapter 7 shows a sample Ruby on Rails application, and Chapter 8 gives a very interesting look into Continuation servers and the work being done by the Smalltalk community on it.

Finally, he closes the book with a list of Primary and Secondary contenders that could up and replace Java. Primaries include Ruby, Python, Groovy, and .NET (C# and VB.NET). Secondary contenders include Perl, Smalltalk, PHP and Lisp, which he summarizes as: "Perl's too loose and too messy, PHP is too close to the HTML, Lisp is not accessible, and Smalltalk wasn't Java". To which he adds, "...go ahead and fire up your GMail client and your thesaurus, and drop me a nasty note. Ted Neward reviewed this book, so I can take a few more euphemisms for the word sucks".

Thankfully there is nothing in this book that would cause me to write a nasty note to Mr. Tate. In fact, if you haven't begun looking at other languages and are heavy in the Java world, I would highly recommend picking up a copy of the book. It's a fast, intriguing read with great insights and the chance to save yourself from looking around 4 years from now wondering what the heck happened, and why all of these developers can afford jewels and play with snakes while chatting among themselves."

You can purchase Beyond Java: A Glimpse at the Future of Programming Languages from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

93 of 517 comments (clear)

  1. Ruby's Quite Nice, Really by Cruxus · · Score: 5, Informative

    I can understand why he noted Ruby as a primary contender with Java. I've been learning it from an online primer, and it seems quite flexible and elegant. Java, on the other hand, is much too bloated.

    --
    On vit, on code et puis on meurt.
    1. Re:Ruby's Quite Nice, Really by PopCulture · · Score: 3, Insightful

      Where do you think Ruby will be in 10 years? My guess is either:

      1) extinct, or,
      2) 'bloated'

      --

      Here's to finally giving Bush his exit strategy in November
    2. Re:Ruby's Quite Nice, Really by AKAImBatman · · Score: 4, Insightful

      Java, on the other hand, is much too bloated.

      People keep repeating this, but it just isn't true. What Java has is an extensive set of libraries that provide all kinds of common functionality. If I were asked to trim it down, I'd have a hard time nixing anything that wouldn't get me in trouble with a LOT of people.

      The main problem that Java still has is a large memory footprint. This is due to loading all those libraries into memory at startup. Why is this done? To reduce startup time. (i.e. It doesn't have to keep hitting the disk every time a new class is instantiated.) Thus Java appears "bloated". Yet if they remove the "bloat", people complain about the startup time. It's really difficult for Java to win this one.

      The only real solution to this dichotomy is to make Java an operating system component. As a system-wide component, it could keep all the info in memory ONCE (including the pre-compiled versions of the classes) and make effective use of the system resources. This is very similar to what most OSes do with their libraries. Sun has taken steps toward this design with new code that preloads the classes into a shared memory area, but it's only partially complete. Given Microsoft's stance on Java, it's doubtful that they'll ever be able to completely solve the issue on Windows.

      Thankfully, systems today have tons of memory and disk space. Since the unused classes will just be swapped out to disk anyway, there's no real concern. So quit whining, and enjoy what the Java platform has to offer. :-)

    3. Re:Ruby's Quite Nice, Really by jcr · · Score: 2, Informative

      I disagree. Not all languages succumb to the pressure to add "features" ad infinitum. Lisp, Smalltalk, and Obj-C are all still quite clean.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    4. Re:Ruby's Quite Nice, Really by AuMatar · · Score: 2, Insightful

      AN OS component? Dear fucking god no.

      The REAL solution is not to put everything and the kitchen sink in the language itself. The language should be a syntax specification, not an implementation of every obscure library you could ever think of. Outside methods similar to CPAN and BOOST do a far better job of being library repositories. The resulting interfaces tend to be better designed to boot.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    5. Re:Ruby's Quite Nice, Really by Anonymous Coward · · Score: 4, Informative

      If you've worked with Java you'll realize everything is *not* in the language itself. The Java language is quite simple, a lot simpler than Ruby for example. Once you understand classes and interfaces you can understand any Java library. This is partly why there are such great development tools for Java - even your IDE can understand it well enough in real time to do something smart. There is a lot of stuff in Java's standard library, and there is a ton of third-party stuff that is commonly used, but that has nothing to do with the language. You can run Java on a cell phone with J2ME, and it's the same language with a different standard library.

    6. Re:Ruby's Quite Nice, Really by Teilo · · Score: 2, Insightful
      Every time one of these RoR vs. Java flamewars erupts, this claim is repeated. The scaffolding scripts, for whatever reason, are a stumbling block to long time Java devs who are looking into RoR for the first time. The moment they see the scaffolding script used, they head for the door.

      But had they stayed, and taken the time, they would very quickly realise that no Rails developer actually uses the Scaffolding script to develop an application unless all they really care about is a down and dirty CRUD. Scaffolding is for prototyping, and nothing else. However, scaffolding does a good job of teaching you how the underlying data objects work. Where you go with it from there is up to you.

      Take a look at the underlying Rails libraries. Learn how they work. Then come back and see if you still can legitimately make the claim that Rails gives one very little conrol over the internals.

      --
      Mir tut es leid, Menschen daß Einfältigfehlersuchenbaumfolgendenaffen sind.
    7. Re:Ruby's Quite Nice, Really by Jason+Hood · · Score: 2, Insightful

      You completely missed the point. Making it an Operating System Component has nothing to do with a repository.

      Essentially Operating Systems would startup a JRE when they startup. The actual memory footprint would be around 16MB for Java5. That way when apps loaded, they could reuse the existing JVM, sharing common classes with other applications. Think of dynamic libraries on steroids. It wouldnt just be a shared library but possibly instatiated objects.

      As for a repository system for libraries, this uneeded. Applications ship with the libraries that they need rather than a perl application that forces the user to download them. Java applications can thus force exact version of libraries on the user without the user having to make decisions. Its a different way to do things, and in my opinion far better. For the desktop, Java has the ideal model. Let users run apps, without having to install libraries (and thus depend on an internet connection or other medium) just to get them to run.

      --
      Are you intolerant of intolerant people?
    8. Re:Ruby's Quite Nice, Really by masklinn · · Score: 2, Interesting

      Seeing as Matz intend to stay in command of Ruby (as he's been since he created it) and has started a complete, faster, more efficient rewrite of Ruby for Ruby 2.0 (without even excluding possible backward-compatibility breakage for the sake of sanity and efficiency), without the errors of the past (e.g. without the mistakes he made raising Ruby from the beginning to the current 1.8.4) and potentially with a JIT at the end, Ruby doesn't intend to take the path Java did.

      And neither does Python, obviously.

      So my guess on where they'll be in 10 years: leading, or evolved into a language transcending them both, a better smalltalk, something even closer to Lisp power while keeping a sane, clean, readable, expressive syntax.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    9. Re:Ruby's Quite Nice, Really by juancn · · Score: 2, Insightful

      The Java language is just a language (and a very small language).

      The mixup comes from the "Java Platform Specification" (which includes the APIs and comes in several editions).

      The "Java Language Specification" only requires a few classes (Thread, Object, Class and String) and that's about it.

      But the usefulness of the language comes from the standard APIs, which let your programs run without modifications in almost every known OS.

    10. Re:Ruby's Quite Nice, Really by msuzio · · Score: 3, Informative

      Ruby is great, but the standard libraries are under-documented and just don't measure up to the JDK (which, granted, is f'ing huge and includes so much stuff I have never in 10 years of programming Java had a need touse). It's also lacking some of the other support I take for granted with Java (for example, nice IDEs - they exist, but are still not as good as the average Java IDE in terms of boosting my productivity).

      It looks like my next language of choice, however. I like the OO concepts, and although the block/yield methodology is a bit awkward (the packaging of blocks into Procs is the way the entire language should have gone, I 'got' that concept much easier), it's solid and on it's way to much wider use.

    11. Re:Ruby's Quite Nice, Really by mclaincausey · · Score: 2, Informative

      WTF? Look at the BNFs for each language: Java is NOT simpler than Ruby.

      --
      (%i1) factor(777353);
      (%o1) 777353
    12. Re:Ruby's Quite Nice, Really by bikerminstrel · · Score: 5, Informative

      Ruby has things like modules, mixins, blocks, procs (closures), builtin syntax for maps and regular expressions, the ability to re-open classes and add or change them, metaobjects, singleton classes which allow an individual object to be extended as opposed to all instances of the class. So yes, I'd say the Ruby language itself is quite a bit more complicated than the Java language itself, though with Java 1.5 it's catching up in its own ways. Granted, you don't need to understand all of the above things to start using Ruby, but neither do you need to know all about Java to start using it. I think what's become bloated about Java is some of the APIs, like J2EE. It's definitely true at least for small apps that you'll write a lot less code to write a Ruby on Rails app than a J2EE app. Also, due to static typing and a less expressive language, Java source code size tends to be a lot larger than an equivalent Ruby program.

    13. Re:Ruby's Quite Nice, Really by AKAImBatman · · Score: 2, Informative

      It's not so much the release process, as the development process, which still requires the distinct build and compilation stages.

      As I said, you can automate it with ANT or Maven. :-)

      Or making changes to a bean and needing to restart java.

      Don't use Tomcat. Seriously. Use Orion or something. With hotdeploy enabled, you can deploy an EAR file just by copying it to a directory. Everything will reload automatically. You said you use JRun? It has that feature as well.

      And I can't (as far as I know) make a separate bean class (component) as a jsp file that can be treated as a bean by the rest of the system.

      You can, and you can't. You can create a include JSP with an anonymous inner class, but it's really kind of dirty. You're much better off using an automated build and hotdeploy.

    14. Re:Ruby's Quite Nice, Really by hepwori · · Score: 2, Insightful
      Java's BNF has 64 productions, Ruby's has 44.

      And you conclude that from those buggy BNFs you linked to? Or something else?

      The import statement BNF you linked to gives the OK to

      import foo.bar.*;;
      import foo.baz.*;;
      but not
      import foo.bar.*;
      import foo.baz.*;

      Nice.

      I'm not disagreeing or agreeing with your assertion about language complexity, but linking to crap like that isn't going to bolster your case.

  2. D programming by AeiwiMaster · · Score: 4, Interesting

    I think digitalmars D is the next big language.

    See it here http://www.digitalmars.com/d/

    1. Re:D programming by xiphoris · · Score: 5, Funny

      Don't mod parent funny! D is a serious programming language with many benefits. It has been around a long time and it's a shame no one has picked it up yet.

    2. Re:D programming by AeiwiMaster · · Score: 2, Interesting

      Take a look at this Computer Language Shootout

    3. Re:D programming by Coryoth · · Score: 2, Insightful

      D is nice, and I certainly appreciate it's addition of design by Contract (even if it is a little kludgy), but I will be surprised if it actually takes off as the next "in" language. It doesn't have the right sort of hype engine behind it. I think you'll see Java and C# duking it out, and growing focus on dynamic languages, particularly when Parrot gets finished. The other developing area for "in" languages is probably functional languages - I think eventually there will be a functional language that, by dint of being different, manages to garner suitable hype and attention.

      Jedidiah.

    4. Re:D programming by Per+Wigren · · Score: 2, Informative

      Yes, D is a wonderful language! The main thing it is missing for it to take off for real now is a stable GUI library. For me, cross platform is a must for me to even look at it. Cross platform is at leastMac OS X, X11 and Windows.

      Currently the most promising project is WxD but it's still not ready for production use. I'd love to see bindings for Qt 4, because it feels much more "native" (user-wise, without #ifdef'ing code for each platform) than Wx currently does, especially on OS X. Also, I find Qt to be better designed.

      --
      My other account has a 3-digit UID.
    5. Re:D programming by Per+Wigren · · Score: 2, Informative

      One thing I forgot to mention in my last post, D is a system programming language. It aims to replace C++ first, Java/C# second. Its design is a lot cleaner than C++ (and even Java and C# in many places) and it's designed with compiler-writers in mind, which means that it is a lot more optimizable than C++. It also has support for inline assembler and things like that. You can write an OS kernel in pure D.

      --
      My other account has a 3-digit UID.
  3. Comparison with perl?? by poeidon1 · · Score: 3, Insightful

    Its probably nice to compare different programming languages but comparing java with something like perl is stupid. Perl is a scripting language to do things more neatly than C/C++, but its not a replacement for Java in any sense. Comparing with C# is much better and should be more detailed.

    --
    They called me mad, and I called them mad, and damn them, they outvoted me. -Nathaniel Lee
    1. Re:Comparison with perl?? by AKAImBatman · · Score: 2, Funny

      I have a better idea. How about we create a PERL -> Java bytecode compiler (or a straight-up interpreter, whichever suites your fancy) instead of trying to mess with birds that won't fly. Then PERL can stop competing and join the Java collective^W^W^W^W gain the full virtual machine benefits that Parrot was trying to emulate. :-P

    2. Re:Comparison with perl?? by Hercynium · · Score: 2, Insightful

      Before I learned Java, I wrote some pretty large, complex apps in perl. Object-orientation, casting, closures, marshalling... perl made so much of that easy (at least to me)

      Now, I work in a department where Java is the canonical language, and other languages are discouraged (except expect - *ugh* - but I understand why)

      And guess what? For the most of the applications we write and deploy, Java is a great choice! Looking back on some of my larger perl programs, I wish I could re-write them in Java. They'd be easier to maintain and extend.

      But that's not always the case. There are days when I'm parsing a log file, or listening on a socket using Java - only to parse it and correlate to a database table and maybe store it someplace else - and my brain is *screaming* to be writing this in Perl.

      Data munging is beautiful in Perl.

      Interoperability is terrific in Java.

      Each was built for different reasons, and it shows.

      *BTW - I think perl interoperates just fine, but not with everything java does.

      --
      I'm done with sigs. Sigs are lame.
  4. News flash: by grasshoppa · · Score: 4, Insightful

    In short: If you're a hard-core Java (or to a lesser extent, C#) developer who thinks Ruby is something that goes on a ring, Pythons will bite you, and Smalltalk is something you have to do at parties, you are in for a rude awakening.

    If you half ass your job in any professional field, you are in for a rude awakening. This is not news.

    --
    Mod me down with all of your hatred and your journey towards the dark side will be complete!
  5. Show me the money! by boxlight · · Score: 2, Insightful
    I'll probably look at Ruby out of geek curiosity, but Java pays *very* well.

    If I'm to dump Java and use Ruby then someone's going to have to show me the money.

    boxlight

    1. Re:Show me the money! by kfg · · Score: 2, Funny

      If I'm to dump Java and use Ruby then someone's going to have to show me the money.

      Lordy, I hope the word "Engineer" doesn't appear in your job title.

      KFG

    2. Re:Show me the money! by kfg · · Score: 2, Interesting

      . . .at the end of the day, you work on the systems your employer tells you to. . .

      One, you have choice in where you work, unless you're one of Thoreau's wooden men. It is the function of an engineer to select the best tools and materials for the job and apply them appropriately. If that is not what you are doing, then you may well be a programmer, but you are certainly no engineer.

      Two, what makes you think my jibe was aimed at the poster? He didn't write his job description.

      KFG

    3. Re:Show me the money! by GnuVince · · Score: 2, Funny

      Maybe he's a Visual Enterprise Java Security Architect!

  6. Perl is not too loose and messy by truckaxle · · Score: 3, Insightful
    "Perl's too loose and too messy" please provide some meat to that aspersion.

    The typical response is to post some obsfustacted perl with a good reg exp thrown in for good measure and some cute comment about ascii explosions. These are red herrings. To these I say:

    Any langauge can be obfusticated and C is perhaps the easiest to obfusticate.

    Built in reg exp are extreme useful - learn to used them and do not fear them. Or good coding style requires you to document them. A single line reg exp can replace pages of code.

    1. Re:Perl is not too loose and messy by Tetris+Ling · · Score: 2, Insightful

      Regular expressions can replace pages of code, but that doesn't mean they should. In fact, I recently had to change a Python program I'm writing to use regular expressions less, because the implimentation just wasn't clear enough.

      And that ends up being the problem with Perl. The language doesn't encourage clean code. Perl is, and probably always will be, useful for small scripts. But any replacement for Java will need to be managable and maintainable on a larger scale than Perl is capable.

    2. Re:Perl is not too loose and messy by a55clown · · Score: 2, Insightful

      the word you're looking for is "obfuscate".

  7. Dynamic typing by CastrTroy · · Score: 2, Insightful

    I don't understand as a developer what dynamic typing does to help a language, and what real world advantages it offers the developer. I find that dynamic typing doesn't really open up new doors, and ends up creating bugs that would have been caught at compile time had static typing been used.

    --

    Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    1. Re:Dynamic typing by Some+Random+Username · · Score: 2, Insightful

      It lets you be more flexible at the cost of making it impossible for the compiler to catch certain bugs. As the most basic example, a single function can take either an int or a float with a dynamically typed language, instead of having to write multiple functions to deal with all the combinations of floats and ints.

      For a nice tradeoff of static and dynamic typing, check out pike. Its statically typed, but lets you give up just as much of that staticness as you need when you need to. You can declare a function as taking float|int for its args for instance.

    2. Re:Dynamic typing by margulies · · Score: 2, Insightful

      The following is taken from Andrew Cooke's excellent write-up of issues like this...

      http://www.acooke.org/andrew/writing/lang.html#sec -staticdynamic

      Static and Dynamic Typing

      Types can be static or dynamic. Languages like Lisp or Python have many different types, but when you look at a piece of code there is nothing that forces a variables to "be" (or to "point to") a piece of data of a particular type. In other languages, like ML or Eiffel, a certain variable will always be connected with a value of a certain, fixed type. The first group of languages (where the type of everything is unknown when the program is compiled) has dynamic types, the second group has static types.

      Dynamic types are good because the program source can be more flexible and compact (which might be particularly useful for prototyping a system, for example). Static types are good because they allow certain errors in programs to be detected earlier (a compiler for a statically typed language may also be able to make extra optimisations using the extra information available, but this depends on details of particular languages and compilers).

      My own view is that at computing projects become larger, static typing becomes more important. I would not like to work on a project with many other programmers using a dynamically typed language, and I choose to use dynamically typed languages, usually, when doing projects of my own.

      In some languages (e.g. ML) the interpreter or compiler can often work out the type associated with a variable by itself, which saves the programmer a lot of effort.
      Strong and Weak Typing

      Types can be weak or strong. The languages mentioned above are all strongly typed, which means that at any point in the program, when it is running, the type of a particular chunk of data is known.

      Since a dynamically typed language does not have complete type information at compile time it must, if it strongly typed, keep track of the type of different values as it runs. Typically values are boxed together with information about their type - value and type are then passed around the program together.

      It might seem that a strong, statically typed language would not need to do this and so could save some memory (as type information is available when the program is compiled). In practice, however, I believe that they still do so - possibly because of polymorphism (see below).

      Unlike the languages mentioned so far, C has weak typing - some variables can point to different types of data, or even random areas of memory, and the program cannot tell what type of object is being referred to. Depending on the context within the program, the variable is assumed to point to some particular type, but it is quite possible - and a common source of confusing bugs - for this assumption to be incorrect (some type checking is done by a C compiler, but not as much as in a language designed to have rigorous compile time checking, like those described as statically typed above).

      Java is strongly, but not statically, typed - classes can be converted (cast) and, if the types are not compatible (related through inheritance - see below), a run time error will occur. Apart from this (significant) exception the Java type system can be considered static - one description is "compromised strong static typing".

      When strong static typing is enforced (even if only partially, as in Java) it can be difficult to write generic algorithms - functions that can act on a range of different types. Polymorphism allows "any" to be included in the type system. For example, the types of a list of items are unimportant if we only want to know the length of the list, so in ML a function can have a type that indicates that it takes lists of "any" type and returns an integer.

      Another solution to the problem of over-restrictive types is to use inheritance from OOP (see below) to group data together. Yet another approach, used in C++, is templates - a way of describing generic routines which are then automatically specialised for particular data types (generic programming and parameterised classes).

    3. Re:Dynamic typing by Coryoth · · Score: 3, Insightful

      Whenever there is a debate about static and dynamic typing people always come out to fight with their blinkers on. They seem to be bound by the mindset of the sort of problems and projects they work on. In practice both have their uses and that's the real reason the debate. I use both, and the choice largely depends on what it is that I am coding. Analogies inevitably fail, but let's try one for this case:

      If I'm building a treehouse for my kids* I'm probably not going to bother with the same sort of formal measurement that I would use to build a house for myself - line it up and cut it to fit will do most of the time. That flexibility is beneficial because I'm building around a tree, and being able reshape and redesign things easily makes a whole lot more sense in that environment (the other option being spending several weeks surveying the tree, and a lot of long tedious calculations to deal with its twisting organic structure).

      If I'm building a house to live in I'm probably not going to just slap it together: I want to have some sort of design and measure everything against that as I go so I can be sure everything will fit together exactly as I want it to when I'm done. This more rigorous checking saves vast amounts of time over a flexible approach because I know that as long as all my measurements match up, the house will stay up - with a more dynamic approach I'll have to be testing everything every step of the way.

      If I'm building a bridge or a bank vault I'm probably going to have another level again of formal requirements and calculations to ensure not just that things fit together, but that I can be certain that it will be safe in all weather conditions, or properly secure from potential thieves. Bothering to have detailed specifications from which extensive calculations and proofs of deep properties can be made is going to save me effort in the long run - it's just another level of formality again, above that used to design and build the house.

      Now to my mind these three cases represent dynamic typing, static typing, and full formal specification (for those who think static typing in Haskell is as high as you can go, check out HasCASL). Each has their own place, and it's a matter of what it is that you're doing that determines which is the most suitable approach. If you mostly work on treehouses then someone telling you that you need to be properly measuring everything is going to seem like a pedant who just wants to annoy you and slow down your treehouse building. If you mostly build houses then someone telling you to hold up the 2x4 to where it needs to go and cut it to shape is going to seem reckless and foolhardy. As long as you're looking at everything only through the type of things you build the other point of view will always look silly.

      Jedidiah
      * (I am not trying to suggest that dynamic typing is for inconsequential or throwaway projects, I just wanted an example that is fairly dynamic and works best with an evolving approach)

    4. Re:Dynamic typing by CastrTroy · · Score: 2, Insightful

      So, basically dynamic typing is good if you want to whip out small projects really fast, but once your dealing with bigger projects, it helps if everything is staticly typed. Personally i've found that even for smaller projects you can save a lot of time using static typing just in debugging time. For the amount of time that i've lost to define a method twice to deal with 2 different types of objects, i've saved tons of time dealing with bugs that result from dynamic typing.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    5. Re:Dynamic typing by dmeranda · · Score: 5, Informative

      If the topic of this book interests you, it is also quite worth reading some of Paul Graham's essays.

      For the dynamic versus static typing debate, in particular read http://paulgraham.com/hundred.html

      I've done both styles quite a lot, and I can say that static typing really is overrated. It sacrifices too much language power for what is really too little benifit (the benifit is often perceived to be much greater than emperical studies of real-world coding errors seem to confirm). The main problem that many static-typing fans seem to have is a lack of exposure to the other way of doing things--and enough experience to allow themselves the freedom to break old habits/patterns to actually see the power of dynamic typing.

    6. Re:Dynamic typing by Jerf · · Score: 5, Insightful

      I don't understand as a developer what dynamic typing does to help a language, and what real world advantages it offers the developer.

      Fact: Nothing is free.

      Everyone will agree with that in principle, but few people have internalized it.

      Static typing is not free. It makes you jump through hoops to type correct code. When you need to change a type, it's even more difficult, especially when it's not something you can search and replace. When changing requirements require you to refactor out some interface, this costs yet more.

      The great failure in this debate between static typing people and dynamic typing ethusiasts largely arises from the fact that static typing people can only see the benefits of static typing, and only see the costs of dynamic typing. You particularly made reference to your own inablitity to see the benefits in your post.

      You can't complete the debate until you admit to yourself that there are costs to static typing, and benefits to dynamic typing. Only then can you intelligently weigh the costs and benefits of each approach.

      I think dynamic typing wins in the vast majority of cases not because "static typing has no advantages", but because static typing charges you through the nose for very, very dubious benefits. Yes, static type correctness catches bugs. But what kind of bugs does it catch? Type bugs. All in all, as someone working in dynamically typed languages exclusively for years now, that's just not the kind of bug I deal with very often. I have logic bugs, architecture bugs, library bugs (bleh! and no these aren't type bugs), comprehension bugs, specification bugs, but I just don't run into type bugs that often. Thus, "paying through the nose" to avoid this particular type of bug is not a compelling bargain.

      You're almost always better off taking the development-speed gains of a dynamically-typed language, and learning the discipline to write good tests (which, incidentally, tend to be easier in those languages). Static type correctness has very little overlap with program correctness. (Neither is even a subset of one another; it's perfectly possible to have a completely correct program that does not meet some definition of "static type correctness".) (Elaboration by somebody else.)

      There are rare calls for static type languages, where it is so important not to make any type errors, ever, that's it's worth the pain of using them. But it's pretty rare for most programmers. (Of course there are programmers who deal in that exclusively.)

      One of the things that could conceivably tip the balance back in favor of static type correctness is if static type correctness becomes more cheap, perhaps with such things like better type inference. But few things are worth the unbelievably staggering price you pay in Java for static type correctness. If you've never used a dynamic language for long enough to see the benefits, you have no idea just how much you are paying.

      Until someone shows me that all the code that I've written in dynamic languages that have served tens or hundreds of thousands of people are somehow riddled with type bugs that have somehow failed to cause my code to come crashing down, I'm going to continue to use dynamically-typed languages. The predictions of doom if you let go of static typing have so far shown themselves to just be fear-mongering, quite a lot of it (as far as I can tell) from people who learned in school that static typing was important and have never even tried anything else.

    7. Re:Dynamic typing by ratboy666 · · Score: 2, Informative



      What "dynamic typing" lets you do is forget about data types.

      Then, code can be restructured to REDUCE the amount of code that is necessary. Sort of what the C++ template system is supposed to do.

      Source code reduction is a very good thing.

      With OOP programming, the idea is that an "object" encapsulates "dynamic type" -- not by type, but by interface. Generally, it is preferred to be able to inspect the possible behaviour at run-time (C++ RTTI).

      This means that generic code can be written, that separates out the thing being done from a particular "type-based" implementation.

      An example is in order: If I have a "type" that represents ordered values, it can have a "less than" and "equal to". Knowing ONLY that, I can derive "greater than" as "not (less than or equal to)".

      I need no further information. Specifically, my "greater than" will now work on ANY ordered type: integer, large integer, float, date, string. And here it is, in psuedo-code (modified to look non-OOP):

      greater_than(orderedX, orderedY)
      return not(or(equal_to(orderedX, orderedY),
                                  less_than(orderedX, orderedY)))

      Now, it may be a NASTY job trying to execute this "efficiently" (or not, efficient language interpretation is not a specialization of mine). But the definition is correct. And can be reused easily (if the language is "correct" (by some definition) the reuse is automatic.

      Languages that implement this are THE most productive: Smalltalk is the prime example. I still prefer LISP, but YMMV. This kind of thing should be easy, and automatic.

      If a language is "OOP" there should be no way of peeking under the covers for an implementation. This is important because it allows the REPLACEMENT of an implementation; potentially at runtime. There is an entire class of bugs that are easily eliminated by this.

      Contemplate the following definition of factorial (and it may be wrong, I am just typing this in):

      unsigned int factorial(unsigned int n)
      {
          if (n
      Ratboy

      --
      Just another "Cubible(sic) Joe" 2 17 3061
    8. Re:Dynamic typing by radish · · Score: 2, Insightful
      Or you could just use overloading:
      public foo doFoo(float) {..}
      public foo doFoo(int) {..}
      or inheritence:
      public foo doFoo(number) {..}
      rather than dynamic typing:
      public foo doFoo(your_guess_is_as_good_as_mine) {..}
      I'm firmly in the static typing camp. Not only does it make things more reliable (due to compilers catching errors) it also prevents those errors in the first place by allowing IDEs to be smart and suggest appropriate parameters. Going back to dynamic typing also means going back to vi as the ultimate editor, and I really am not ready to give up my IntelliJ thanks.
      --

      ---- Den ene knappen er powerknapp, den andre er Bender voice knapp "Bite My Shiny Metal Ass"

    9. Re:Dynamic typing by 0xABADC0DA · · Score: 2, Insightful

      The comparison of bug rates is false, because it assume the same programmers are doing work in both types of languages. They aren't.

      Fundamentally, what you perceive as "power" or "expressibility" in a dynamically typed language is due to lack of structure. For example, in Smalltalk one can add a new method onto Object and then one can call this method on any instance of any type. This means you can solve some requirements in such a dynamically typed language in a very small amount of code, by tweaking how the system works.

      But there is no free lunch. This "power" means that you cannot take an arbitrary program and know what it does without considering then entire system it resides in. Or in the dynamically-typed languages that do not allow modification of the common classes, you cannot usually take a subset of the program and know what it does without considering the entire whole. Static typing acts as a barrier, allowing code to be isolated from the rest.

      You have to realize that, for the vast majority of programmers, that the structure is necessary. Those programmers working in dynamically-typed languages fail; they produce spaghetti. Sure, you *can* maintain structure in a dynamically typed language such as Smalltalk or Ruby. But programming is a constant struggle to keep the code from descending into chaos.... and the harder the language makes this the fewer that will be able to use it effectively. That's why these languages typically are used for scripting or for projects only done by an elite few of highly competent developers (fyi most web development work is basically scripting).

    10. Re:Dynamic typing by mad.frog · · Score: 2

      Interesting. See, my response would be:

      "I've done both styles quite a lot, and I can say that dynamic typing really is overrated. It sacrifices too much error checking and code readability in large group-programming situations for what is really too little benefit, and allows you to let the language help you avoid the trivial errors so that your brain can focus on solving the interesting problems. The main problem that many dynamic-typing fans seem to have is a lack of exposure to a really well-thought-out, well-designed, large-scale system with static typing -- and enough experience to allow themselves the freedom to break old habits/patterns to actually see the help that static typing gives in developing large systems reliably."

    11. Re:Dynamic typing by mad.frog · · Score: 3, Insightful

      static typing charges you through the nose for very, very dubious benefits

      Well, as they say, "your mileage may vary".

      From my development perspective, static typing isn't a cost, it's a dividend.

      Code with explicit typing, to me, is MORE readable, more clear, and easier to deal with, because type expectations are spelled out explicitly; I *can't* avoid specifying them, because the language won't let me. Maybe you find it to be annoying, irrelevant dreck that drowns out the meat of the program, but for me, types are inextricably part of the meat -- removing them makes me wonder, "what are the expectations for this again? I hope someone commented it properly..." (And yes, I've done enough work in dynamic languages to have valid opinion of both sides.)

      You're almost always better off taking the development-speed gains of a dynamically-typed language, and learning the discipline to write good tests

      Yeah, yeah, yeah, I've heard this argument. I happen to agree that improved testing is a good thing, and that testing frameworks tend to be harder than necessary in most current static-typed languages. But IMHO this argument is rather like saying that seat belts are unnecessary if you have air bags (or vice versa); I'll take *both*, thanks.

      Until someone shows me that all the code that I've written in dynamic languages that have served tens or hundreds of thousands of people are somehow riddled with type bugs

      Whoa, slow down, no one's saying that dynamic languages are impossible to write proper code in. My assertion is that static typing is a tool to help programmer's avoid dumb mistakes, and to make the meaning of the code more clear. Can I get by without this tool? Yeah. But I don't see a good reason to, in general.

    12. Re:Dynamic typing by arevos · · Score: 3, Interesting
      I honestly prefer having types. I prefer people thinking ahead of time about what they are doing, rather than just using a generic object or variant type thing. It's like the databases we have at work where the identifiers are varchar but are for the most part filled with numbers.

      That sounds more an example of weak dynamic typing, rather than strong dynamic typing, such as in Python or Ruby.

      I think your whole argument could go the other way. That proponents of dynamic type checking probably having used anything else and just can't recognize the terribly costs that dynamic typing places on their system.

      I'm a Java programmer professionally, so I use static typing all the time. However, I also doubt it's that beneficial. Static typing puts a limit on what you can do with a language. In an object orientated programming, it limits the OO model by having a solid distinction between classes and objects; classes are defined at compile time, objects at runtime. In a language such as Python or Ruby, classes are objects, so there is no such distinction. This in turn gives the programmer access to greater layers of abstraction, which can often be a very good thing.

    13. Re:Dynamic typing by Anonymous Coward · · Score: 2, Insightful

      Fact: Nothing is free.

      Yup.

      But what kind of bugs does it catch? Type bugs.

      Type bugs are almost always logic bugs or comprehension bugs. If you understood the requirement and implemented it correctly, the type should be correct.

      In fact, when I was taking chemistry in school, I would often guess at the correct formula for something based on the units. Nearly always worked. And if you ever end up with the wrong units, you KNOW the answer is wrong.

      Static type correctness has very little overlap with program correctness.

      Try writing some stuff in Haskell and see what you think. Many people have commented that code either fails to compile or works correctly.

      Of course type annotations are mostly optional in Haskell due to type inference, but adding it or checking the type later helps a lot. (I'll often add annotation by asking what the type is, saying "yup, that looks right" and copy-pasting it.)

    14. Re:Dynamic typing by mixmasterjake · · Score: 2

      It's a pretty classic argument of strict syntax vs loose syntax. You can either see the strict syntax as shackles or a useful tool. Dynamic typing gives you more freedom, but offers you no protection. Sure, you can argue that it forces you to be dilligent about your coding practices, but the burden is on you to not make any mistakes.

      My biggest problem is that the errors that do usually happen from type-related problems tend to be difficult to find. Rounding errors and wierd behaviors when a "523" gets treated as ASCII - they can waste hours debugging. Just one of those can easily out-do any overhead from using a typed language.

      I personally would like something like the Perl strict and the old VB option explicit features. That only applied to declaring your variables, though, niether of them care about the type. If you could force strict typing when you need it, that would be pretty cool.

      --
      TODO: come up with a clever sig
    15. Re:Dynamic typing by sproketboy · · Score: 5, Insightful

      Here in a nutshell is what's wrong with dynamic typing.

      // Proto language dynamic typed
      // This function trims a string from the 2nd param
      FUNCTION trimString(a, b)
         IF typeOf a <> "String" OR TypeOf b <> "Number"
           // er, not sure what I should do here.
           // Maybe the caller passed the wrong params OR
           // maybe I was passed the wrong number of params OR
           // maybe I was passed NO params
           // I "guess" that maybe I cuold throw an error OR
           // maybe I should just pop up a message box OR
           // Is this a web application? If it is I really can pop a message box
           // I "guess" that really I should just throw an ugly runtime error
           // at the user even though this realy should be a "compile" time error.

           throw new WTFError()
         ENDIF
         // Code goes here....
      RETURN

      In other words. It's *impossible* to write any kind of generic code without having to deal with these kinds of runtime issues.  Much better code:

      // Proto language static typed
      // This function trims a string from the 2nd param
      String FUNCTION trimString(String a, Number b)
        // code goes here....
      RETURN

    16. Re:Dynamic typing by arevos · · Score: 2, Interesting
      Both languages can load classes dynamically - a good example would be Apache Derby which translates SQL queries into compiled java classes, which can then of course be jitted at some point.
      Yeesss... It is possible to combine class loading and dynamic bytecode generation to achieve similar results. But this appears to me to be akin to using a sledgehammer to do a screwdriver's job.

      Recently, I wanted to convert Pygame's event system into something more usable, by wrapping each event type in a python class. (Unfortunately, due to a lack of reflection in Pygame's C interface, I had to specify the methods in each class, myself).
      def PygameEvent(name, methods):
          def __init__(self, event):
              for method in methods:
                  setattr(self, method, getattr(event, method))
          return type(name, (), {'__init__' = __init__})
      Given this four-line function, creating a new class is a one line job:
      KeyDown = PygameEvent('KeyDown', ('unicode', 'mod', 'key'))
      A ready-made wrapper for pygame.event.Event objects. I don't know of a fast way to do this in Java. Either I'd have to define a whole new class for each event type:
      public class KeyDown extends Event
      {
          private String unicode;
          private int mod;
          private char key;
       
          public KeyDown(pygame.Event event)
          {
              unicode = event.getParameter("unicode");
              mod = event.getParameter("mod");
              key = event.getParameter("key");
          }
       
          public String getUnicode()
          {
              return unicode;
          }
       
          public int getMod()
          {
              return mod;
          }
       
          public char getKey()
          {
              return key;
          }
      }
      Or I'd have to devise some more complicated JIT compiling alternative, which would take more time than going through the long process of creating all of the classes myself.

      This, of course, is a trivial example. But there are other times when dynamic typing and class generation opens up avenues of design that aren't available otherwise.
    17. Re:Dynamic typing by Eivind+Eklund · · Score: 2, Insightful
      The elite programmers I know tend to choose which language is appropriate for which project. I can't think of any I'd consider "elite" that program less than 3 languages.

      And I've seen much more chaotic code in Java than in Ruby; chaos isn't a function of static or dynamic typing. It is mostly a function of programmer and manager competence, though also a function of the surrounding culture and what the language makes easy. Perl, for instance, tend to encourage halfassed programming.

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
  8. Ruby on Rails by ukpyr · · Score: 2, Insightful

    Ruby / Rails is really cool. I've not done any application development in it though, other than tutorial type stuff.

    Other than some pureist OO stuff, and a really nice framework, I fail to see what Ruby on Rails brings to the table that say, perl, php and other P type languages don't already offer in terms of actual functionality. I'm not saying it's unneeded or anything stupid such as that. More=better as far as languages go.

    JSP also allows for some RAD-like work. The languages I've mentioned clearly do. Why is Ruby the next big thing? To sell more books?

    It's just like the whole AJAX hype storm. No tool is a one size fits all. Do I need to go back and add an AJAX layer to all my newsletter signup boxes? Do they suck if they don't dynamicly provide feedback?

    Do I need to bind all my database structures to my objects?

    Do people really think that way?

  9. Rails by jkauzlar · · Score: 3, Insightful
    Although I cringe at the name "Ruby on Rails," I'm assuming I'll get past that. I've been writing Java for years and, afraid of falling behind, I decided to try out rails to see if I really could, as the books all say, become more productive. I certainly think it's something to look into. The language's lack of type safety (or even 'my'!) sets off a continual internal alarm and nags at me to no end, but I find I can just set the vars to zero to get past that.

    What I've found is that it really is much faster in initial development. Rails has an explicit separation of model, view and controller code, while in Java it tends to become convenient to mix all but the lower levels within .jsp pages. Another worry I have is the packaging system, which is harder to manage than Java's dom.company.package.subpackage structure. I could imagine that namespace conflicts would be inevitable in Ruby as with other 'scripting' (sorry to use that word) languages.

    I haven't gotten much further than that.. Once I get to the point of having to maintain and expand on a larger codebase I'll no doubt have stronger opinions on its strengths and weaknesses, but for now, I'd say that most of what people are doing in Java can be done more simply and faster in Rails (or perhaps a Perl framework). I'd be concerned about its resilience and scalability on larger systems, as well as its industry or 3rd party support (Java's support, esp from Apache, is outstanding).

    1. Re:Rails by sulam · · Score: 5, Insightful

      Rails (not Ruby) is faster than Java because it's a RAD framework. R = Rapid. If you used a Java RAD framework (there are a couple), it'd be just as fast. Ruby _can_ be faster (to develop) than Java due to things like collections semantics, but there's no guarantee it will be. As far as MVC separation goes, the two languages are functionally equivalent with the right framework. People conflate Rails with Ruby, but that's a mistake. Java was popular long before any great web frameworks existed for it, but now that they're there, people don't conflate WebWork (for instance) with Java. They do with Rails and Ruby because the two are getting popular together. With Rails, you have .rhtml files as your view, with scripting possibilities available there. You have your controller obviously, and your model bound to a db via ActiveRecord. This is no different from something like WebWork where you have a .jsp file as your view with JSTL scripting available within it, a controller class that provides objects to the view to manipulate, and model objects that use Hibernate to bind to a db. Ruby will get additional libraries and third party support over time. Heck, it may even get another web dev framework besides Rails (would be nice, people might quit conflating them). So I think over time Ruby will become a more compelling replacement for Java, and of course people who like to do original development for the sake of getting their name out there or just pride have a lot more to do in Ruby than they do in Java. That's true for books too, imagine trying to write a Java book today covering almost any topic, it's guaranteed to be a "me too" book. But with Ruby you can be the first guy to write the classic ActiveRecord book, or whatever it is you become an expert in. So yeah, it doesn't surprise me that people who create libraries or right books are excited about Ruby, there's more left to do. But that doesn't mean I'm gonna start using it in production code. :)

  10. Ah. Dynamic typing. Again. by jameson · · Score: 5, Interesting

    Well, if it's dynamic, it must be good, right?

        I pray that the future will not be dynamically typed. We have enough run-time bugs as-is, and while I am in no way opposed to doing prototyping in dynamically typed languages, I would much prefer my everyday applications to be written in languages that don't constantly segfault because of pointer arithmetic, raise null pointer exceptions because nullable and nonnullable types are not distinguished, or give syntax errors at runtime because they happen to be fully interpreted.

        Most static type systems suck, which is why people don't like them, but people who have used, say, SML or Haskell, tend to agree that static types can be something very natural and useful (the SML community has a saying which goes, roughly, "if it compiles, it's almost certainly correct").

        I don't know about you guys, but I'd much rather have a slightly harder time with dynamic module loading, reflection (which, IMHO, is vastly overrated, considering the correctness/safety/usefulness tradeoff) and perhaps side effects than having to find all of my bugs (rather than 5% of them) through testing.

        Just my EUR 0.018.

    -- Christoph

    1. Re:Ah. Dynamic typing. Again. by the+eric+conspiracy · · Score: 4, Insightful

      I agree with pretty much everything you say, especially with the frequent abuse of reflection. Runtime errors that occur in production at a client's site are a real heartache, and are often very expensive to debug and fix. Any language model that increases the likelihood of this is a bad design IMHO.

      I've been using Python for prototypes, and have come to like the concise and clear nature of the syntax compared to Java and Perl. However I don't like the thread handling, the lack of quality compared to Java in the libraries, and the lack of some libraries that enterprise applications commonly use. Some performance measurements I've made also show Java is 4-10 times faster.

    2. Re:Ah. Dynamic typing. Again. by Ian+Bicking · · Score: 4, Insightful
      I would much prefer my everyday applications to be written in languages that don't constantly segfault because of pointer arithmetic, raise null pointer exceptions because nullable and nonnullable types are not distinguished, or give syntax errors at runtime because they happen to be fully interpreted.
      The only time Python segfaults is when you have some really crazy code, or far far more commonly when you have C code in your system and that code is bad. Most dynamic languages also are not fully interpreted -- Python is not, and Ruby is interpreted, but won't raise syntax errors at runtime. The exception is if you are doing source code generation, which Rails does a fair amount of, but is not very common in Python code.

      Now, the null pointer exceptions don't happen in these languages because there are no pointers, but similar things do happen. And they happen in Java too. Java not statically typed enough? Well, whatever, you get back to me when you have that awesome statically typed language with no slop that anyone actually does useful things with.

      I don't think experience has shown us that statically typed languages are more reliable than dynamic. Programs that are developed with obsessive attention to detail, extensive review, and formalized practices and standards are reliable. None of those has anything to do with static typing; static typing is the absurd notion that the computer can be disciplined for you. If you look at something like programming by contract, it has nothing to do with static typing -- it's all about the programmers writing the system spending time indicating the exact needs and promises of the API, and language gives those programmers a structure in which to describe and automatically confirm those promises.

    3. Re:Ah. Dynamic typing. Again. by AT · · Score: 2, Insightful

      I used to think the same way: static typing catches bugs. However, in the past few years, most of the projects I've worked on (largish server side Java systems, primarily) have used some form of dynamic typing anyway. This is usually accomplished by using java.lang.Objects in interfaces or passing around name/value pairs as HashMaps. In some cases, it has been a programmer taking shortcuts, in others, it's been a deliberate design decision.

      What's notable though, is how few bugs it has caused. And the bugs that did occur usually were trivial to find and fix.

      I've also been investigating some dynamic language frameworks (Ruby on Rails, Django), and although the scope of the projects has been small, I haven't seen a huge cost due to the use of dynamic typing. Although more type-related bugs occur, as above, they are easy to catch and fix.

      From an academic perspective, the guarantees of type correctness sound nice, but in my experience, they don't provide much practical benefit. Systems like pike with dynamic typing with optional constraints has the best balance, IMHO.

  11. Rails and unit tests by tcopeland · · Score: 2, Informative

    One nice thing about Rails is that the unit tests are built in. Rather than having to go out and use JUnitWebTest or whatever, once you start writing Rails code the basic tests are generated for you and writing new tests involves fairly readable code, like this:

    assert_redirected_to :action => "thanks_for_applying"
    follow_redirect
    assert_res ponse :success

    It seems like the folks who are writing Rails are aware of the whole web development picture; not just getting a web app up but also making sure it's well tested. It's certainly making RubyForge much busier...

    Oh, and, book plug!

  12. News flash! by GileadGreene · · Score: 5, Funny
    News flash! Not every tool is right for every job! In other news, newly released book discusses why afterburning turbofans make poor engines for commuter cars.

    And no, the Batmobile doesn't count as a "commuter car".

    1. Re:News flash! by RetroGeek · · Score: 2, Insightful

      I don't know. I have had training (or self taught) in:

      Basic/ GW-Basic
      Visual Basic/ VBA/ VBS
      REXX
      Perl
      Fortran
      COBOL
      Pascal
      Assembler
      SQL
      Java
      JavaScript
      C
      C++
      JCL
      DOS/WinXP batch commands
      WordPerfect PerfectScript
      dBase/ FoxPro
      PHP
      HTML/ XHTML/ DHTML/ CSS
      XML/ DTD

      I am current in Java, *ML, JavaScript, Visual Basic

      Not all computer languages, but hey, markup languages also have syntax and quirks.

      As for all the (probably hundreds) of choices, each was created for some reason or other (heck I created my own interpreted language). Most of them are fringe, but the main stream ones were carefully designed (hmmm, maybe not PHP) to be the next generation.

      Each new language builds on the work of others and hopefully does not inherit the bad things. Old ones fall by the waysside. Everyone has their favourite. The more languages you know, the more you can do in any language.

      Take for instance Java vs PHP. Both do web pages. If I was creating a small hobby level site, I would probably use PHP with MySQL. But for a large site which must scale, which has hundreds of pages, which must have a common look and feel, it is Java every time with one of the big databases (MSSQL, Oracle, DB/2).

      Its the old adage: If all you have is a hammer, everything looks like a nail. I prefer to have a full toolkit.

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
  13. Lisp by fionbio · · Score: 4, Insightful

    I have been thinking that 'Lisp is not accessible' for years. I regret all these years beyond expression. Don't believe it. It's horrible lie. Here's the proof.

    1. Re:Lisp by Scarblac · · Score: 4, Interesting

      Hey, that's what I was going to post!

      I used to work as a Java programmer, then on to Python and Perl. I've looked at RoR, and it's extremely impressive (basically, one guy defined web app best practices for the next decade, I think - not necessarily this particular implementation in Ruby, but the setup of the framework, emphasis on good defaults, sensible object model, well integrated testing, real easy use of Ajax, etc... very impressive)

      But then I read Practical Common Lisp. And it rather opened my eyes. Turns out all these dynamic features of Python, Perl, Ruby etc are really just subsets of what's available in Lisp (like those Lisp people always insisted, but I never believed), and it's blazingly fast. It's compiled into machine code. I'm in love.

      Right now, the useful Web libraries are just about there, but I don't think they are quite as featureful yet as what we're used to in the scripting languages. But I expect that to change dramatically in the coming year, as so many web programmers are checking out that book...

      --
      I believe posters are recognized by their sig. So I made one.
    2. Re:Lisp by JanneM · · Score: 2, Insightful

      Well, thousand page standard may not be always a good thing, but IMO it's better than having to rewrite your program from scratch every time you switch implementations.

      One major problem is that when a language defines a very large environment - and especially when the designers have been 'clever' about the design - it will frequently be several times faster to implement some functionality yourself than to find out if, and how, to do it with the standard framework.

      Yes, you can depend on the library to be debugged, optimized and correct (to a larger extent than your own attempt, at least), and yes, taking the pain of learning it now will pay off in years to come. But when the deadline is looming, and you are faced with a two to four hour programming task, or an all-day look through documentation and example code to determine if and how you can do what you need (that may in the end result in you writing it yourself anyway) it's very easy to just do it yorself, and put off learning about the 'right' way to do it to later (ie. never).

      OK, this is not a dig against LISP - this issue of having very large piles of functionality is common to many languages, from C++ to LISP to Java, to Perl. How many people actually use even all the nifty goddness of glibc, for example?

      --
      Trust the Computer. The Computer is your friend.
  14. (ot-ish) Perl is not too loose and messy by tehshen · · Score: 2, Informative

    Actually, I've been thinking about this for a while, and Perl seems "messy" to some because it has so much special syntax, that other languages just have as functions.

    Example, if you had a list of files, and you wanted to print files from a list that exist (not contrived, I was doing this the other day) you would probably write something like:

    foreach (file in files) {
        if (Exists(file)) {
            print file;
        }
    }


    A programmer who has never seen the language before could read through the code... "for each file... if it exists... print it". In Perl, I would do:

    print grep { -e $_ } @files;

    Although I would think "print all the @files that match the condition (they exist)", someone who has never seen Perl before would be like "whoa". Sure, it looks like nonsense, but that's only if you don't understand Perl. It's clear to me what it does, and I am no Perl-guru. People who think Perl is messy should take the time to learn it before slagging it off.

    --
    Guy asked me for a quarter for a cup of coffee. So I bit him.
  15. It's Too Much. by Cranky+Weasel · · Score: 5, Insightful

    On any large development project, by the time you've actually rolled into production, the toolset you selected is already out of date, and you have to start an "update the back end" project. And of course next is the project to unify your companies approach to delivering solutions, which means projects to bring the other projects in line. And when you're done that, it's time to revisit the back-end again.

    I'm only 35 and I'm so tired of it. I don't want new languages. I just want to work with tools the team truly understands.

    I have a life outside of work. The days of my wanting to read through stacks of documentation in the evenings to learn the latest new thing are gone.

    So I'm being groomed for what I think is the natural progression for the tired but still knowledgeable developer... project management.

    1. Re:It's Too Much. by pileated · · Score: 3, Interesting

      Bruce Eckel's "Departure of the Hyper-Enthusiasts" might be to your liking:

  16. Java's regexp support is yucky by wurp · · Score: 3, Interesting
    Compared to perl's regexp support, in which regular expressions are first class language features on the same level as strings, integers, arrays, etc., Java's regexp support is laughable.

    I only use Perl for quick scripts, but compare the following:

    Perl:
    /Email\s*:\s*([^\s]*).*?Name\s*:\s*([^\s]*)/i;
    ($email, $name) = ($1, $2);


    Java:

    import java.util.regex.*; ...
    Pattern emailAndName = Pattern.compile("Email\\s*:\\s*([^\\s]*).*?Name\\s *:\\s*([^\\s]*)", Pattern.CASE_INSENSITIVE);
    Matcher matcher = emailAndName.matcher(text);
    String email = matcher.group(1);
    String name = matcher.group(2);


    It is telling that I had to go look up the Java interface (I am a professional Java developer and have been for 8 years), while the Perl came naturally (I am pretty good with Perl, but I only use it for scripting support).

    Java does NOT have built-in regular expression support, at least not at all in the same way that Perl does.
  17. Wrong site? by thePowerOfGrayskull · · Score: 2, Funny

    : If you're a hard-core Java (or to a lesser extent, C#) developer who thinks Ruby is something that goes on a ring, Pythons will bite you, and Smalltalk is something you have to do at parties, you are in for a rude awakening

    If I thought all those things, I'm probably at the wrong web site.

  18. Python by nuon3 · · Score: 3, Informative

    I'm always wondering why Python is left out from this kind of conversations.
    Python is the best language I've ever worked with. It's very human friendly, no need to learn/read/write hieroglyphs, like in Ruby or Perl. Very compact, no need to write a pages of text to print Hello World, like in Java. It's very oo, supports multiple inheritance, what makes code reuse a reality. Has a wide range of modules, a wonderful application server, called Zope, a code generator, that eats UML and many many features, to make it an outstanding choice.

    1. Re:Python by scottsk · · Score: 2, Informative

      Not only that, but with Jython you get the killer embedded scripting language for zero effort other than adding a jar file - it allows you to drive all your object model's objects in a script. If you have a good MVC design in the first place, you can do amazing stuff to extend your application using Jython scripting. I wouldn't even design a Java program anymore without embedding Jython. (You can do this with JavaScript too, but the language isn't as powerful.)

    2. Re:Python by kaffiene · · Score: 2, Insightful

      I'm always wondering why Python is left out from this kind of conversations.
      Python is the best language I've ever worked with. It's very human friendly, no need to learn/read/write hieroglyphs, like in Ruby or Perl. Very compact, no need to write a pages of text to print Hello World, like in Java.

      For christ's sake - would people stop making these STUPID comparisons?

      Java is not designed to write "hello world" in one line or less, it's designed to solve big, complex problems quickly, safely and maintainably. Look at something like checked exceptions - that's a PITA if all you are concerned with is a quick scripted hack, but it's important when you're writing huge systems that need to be resilient in the face of the unexpected.

      Java IS NOT A SCRIPTING LANGUAGE. Stop comparing it to one. Java properly contrasts with C, ADA or C++

  19. Beyond Java? by TheSkepticalOptimist · · Score: 2, Funny

    I thought nothing, a void, Java is a black hole that just keeps sucking. Its what happens when a Sun goes supernova.

    --
    I haven't thought of anything clever to put here, but then again most of you haven't either.
  20. Author: cheerleader for Ruby but has good points! by scottsk · · Score: 2, Insightful

    I read this book too, and my impression overall was the author is a cheerleader for Ruby. Which is fine, because Ruby has made some important OO design contributions. It seems like a very elegant language, what Python could have been.

    The book's assessment of Perl seems superficial. I am sure I could write bad code in Ruby if I wanted to. Just because Perl embeds regular expressions into the language syntax rather than making you import a library, this doesn't mean Ruby (or any other language) would be any more readable if you had to put regular expressions into its source code. Sooner or later, you'll have regexes in your code regardless of the language. Try writing something useful in clean, elegant REXX which has no regex support!

    The PHP snippets are something no PHP programmer would write, and make me wonder if the author knows anything about the language. I don't think PHP gets a fair shake. Curious that PHP and Perl both don't impress the author much, and both are real-world, get-it-done languages. The author tends to like Ruby, LISP, etc more.

    The author does get credit for looking seriously at non-mainstream alternatives like LISP!

    I don't remember the author mentioning that Python can run in a JVM and give you an instant, full-featured scripting language for your Java object framework. I love Jython, even though I'm not a big Python fan in general. Listen up, Ruby evangelists: You need to get Ruby running natively in the JVM like Jython! Then you'd have the KILLER language.

    Overall, the author doesn't mention that the goal of my-favorite-scripting-language is to rewrite CPAN's core modules in the language. It's like a language used to have to compile itself. Now, a new language has to have a huge standard library to be serious. Library inertia is what will hurt Ruby, Python, etc - after spending huge amounts of time writing to the Perl or PHP core modules, am I going to rewrite all my web site's code in a new language, or try to learn a lots-of-little-differences syntax for a new standard module library? Probably not.

    Overall, a thought-provoking book whether you agree or disagree.

  21. My first experience with C# by Weaselmancer · · Score: 2, Interesting

    I program Java. Recently had to do a C# project.

    My first thought - Hey! This is a whole lot like Java. Only took me a couple of hours to learn the syntax differences. I'm off and running!

    Two hours later I hated it. If you'd like to know why, allow me to offer you the following observation/puzzle.

    In C#/.NET, create a form. Put a text box on it, and a button. Have the button create a thread. Have the thread write "Hello world" in the text box.

    Because I'm feeling generous, here is the Java code:

    private class myThread extends Thread {
    public void run() {
    jTextPane1.setText("Hello from a thread");
    }
    }

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    new myThread().start();
    }

    Good luck with the .NET code. I'll give you a hint though. It requires a delegate function, because C# .NET forms aren't thread safe. If you manipulate the text box from the thread without a delegate it dies. As a bonus, you get a really illuminating error when that happens:

    [System.NotSupportedException] "An error message cannot be displayed because an optional resource assembly containing it cannot be found"

    Wonderful language. Really.

    --
    Weaselmancer
    rediculous.
  22. Not written by a programmer by SassyDave · · Score: 2, Informative

    By the way, the author, Bruce Tate, is not a programmer. By his own admission, his qualifications are based on experience "reading code" and hiring developers. I listened to him speak at a conference, and I was underwhelmed with his presentation's technical content.

  23. Lisp not accessible? by youknowmewell · · Score: 4, Informative

    Lisp isn't accessible? Is that because of the parens or some other reason? If it's the parens, then obviously people are too superficial to look past the syntax (which is minimalistic to say the least). I've coded (and continue to code) in PHP, which has C-like syntax. When I first saw Lisp it was a bit different, but that's all it was: different. In fact, because there is so little syntax to worry about it makes the language even MORE accessible than C-like languages.

    I've been reading Practical Common Lisp, and I have to say I love Lisp so far. I'm down to the practical examples and continue to enjoy the experience of reading, learning and coding lisp. It's certainly an excellent book and it shows, since it is a finalist in the Jolt awards.

    Paul Graham is a big advocate of Lisp. He made big bucks selling is 3 year-old company to Yahoo, a company that was built off of software coded in Lisp.

    Of course, one can't forgot the quote from Eric Raymond's 'How To Become A Hacker': LISP is worth learning for a different reason -- the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP itself a lot. I especially like these quotes from the blurbs section of the PCL website:

    "This book shows the power of Lisp not only in the areas that it has traditionally been noted for--such as developing a complete unit test framework in only 26 lines of code--but also in new areas such as parsing binary MP3 files, building a web application for browsing a collection of songs, and streaming audio over the web. Many readers will be surprised that Lisp allows you to do all this with conciseness similar to scripting languages such as Python, efficiency similar to C++, and unparalleled flexibility in designing your own language extensions." --Peter Norvig, Director of Search Quality, Google Inc; author of Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp

    "Please don't assume Common Lisp is only useful for Databases, Unit Test Frameworks, Spam Filters, ID3 Parsers, Web Programming, Shoutcast Servers, HTML Generation Interpreters, and HTML Generation Compilers just because these are the only things happened to be implemented in the book Practical Common Lisp.--Tobias C. Rittweiler, Lisp Programmer

    Lisp was once in the same position C, C++ and now Java were/is in. It was one of those languages you had to know if you were going to get a job in programming. The only reason why it isn't still in that position is because it was ahead of its time. It was once thought to be slow, but Lisp compilers can compile to machine code and run as fast or even faster than C/C++. Lisp gives you the flexibility to code quickly to get features working and it also allows you to go back and optimize your code to perform at C levels.

    So don't make the mistake of thinking Lisp is simply a worthless, academic language. Just check out Practical Common Lisp and see for yourself!

    1. Re:Lisp not accessible? by be-fan · · Score: 2, Informative

      I have to concur. After several years of programming C++, switching to Lisp was an awesome experience. It's a very productive language, has very fast compilers that can generate native code, and has some excellent development tools (Emacs + SLIME). For people who can get away with using it on a project (ie: you're not forced to make yourself easily replaceable by using a "commodity" language), I seriously recommend at least an enthusiastic attempt to learn it. "Enthusiastic" is the key word here. If you go in skeptical, you'll never get past the fact that its different from what you're used to. You'll get hung up on the parens, the naming conventions, etc. Common Lisp was designed to be a programmers language first and foremost. Thus, you really can't appreciate its power and flexibility until you write something substantial in it.

      --
      A deep unwavering belief is a sure sign you're missing something...
    2. Re:Lisp not accessible? by be-fan · · Score: 2, Informative

      It's been done. It's called Dylan. It's got much of the power of Lisp, much of the speed of C++, and has a conventional syntax. Apple was pushing it for awhile in the early 1990s. Unfortunately, it never really caught on. The Lisp users didn't like the new syntax, and the project's distancing of itself from Lisp, while the mainstream didn't like it because it was created by a bunch of Lisp gurus. The Apple Dylan implementation suffered from being too memory hungry (like most OOP languages) to fit properly in a Newton, and lost out to a competing C implementation of Newton OS. Ultimately, the language was killed (within the company) when Apple closed its Cambridge Development Lab. Today, there are two existing Dylan implementations maintained by the Gwydion Project. The first, Gwydion Dylan, is derived from CMU's Dylan Compiler while the second, Open Dylan, is derived from Harlequin/Functional Objects's compiler.

      --
      A deep unwavering belief is a sure sign you're missing something...
    3. Re:Lisp not accessible? by youknowmewell · · Score: 2, Informative

      Without the Lisp syntax, macros aren't even possible. Or at least the implementation of macros becomes exponentially harder. Macros are really one of the fundamental Lisp features that make it so powerful.

      Another funny thing that most people don't realize (I know I didn't) is that Lisp is HIGHLY object oriented, more so than Java (not sure about Smalltalk/Ruby though). Lisp can be used in nearly the same way as other object oriented languages. It's just not a requirement.

      What's funny is that at face value one gets the impression that Lisp is trying to be everything to everybody, but in fact Lisp isn't everything. It just gives programmers the ablility to make it everything :) "A programmable programming language" it is.

  24. Boo Ruby + Java by mythz · · Score: 2, Informative

    You shouldn't need a dynamic scripting language to be productive. If you want something with the productivity and brevity of Ruby with performance >= Java, you should check out Boo (http://boo.codehaus.org/).

    It can run on mono/.NET which gives you access to the .NET Framework, has Python inspired syntax (wiithout the annoying quirks), and advanced language features not even found in Java like: properties, events, closures, extensions, macros, partial classes, etc.

    It can run in interactive mode (without needing a compile) or compiles down to CIL giving it the same performance as C#.

  25. Not very insightful by Ian+Bicking · · Score: 4, Interesting
    I have read parts of this book, and still need to write a review of my own since I got a review copy, and that's supposed to be the deal. If you are going to write a book "Beyond Java" you probably should have ventured beyond java a little yourself. I don't think the author did in a signficant way. It includes contributions by other people, but most of those people are primarily Java developers who have history with other systems or are flirting with them currently. This isn't sufficient to give you a feel for the lay of the land. This isn't enough to write a book.

    If he had tried, he could have gotten insightful and well-thought-out contributions from developers who are experienced with the kinds of things he talks about. He could have edited them down to be concise and reasoned expositions on the benefits and pitfalls that might lie ahead for the Java developer interested in change. Not everyone is a cheerleader, lots of people with lots of experience and investment in these other technologies are willing to talk about them in reasoned ways, and offer some real wisdom about the good and bad. But he just talked to a bunch of Java guys. No offense to those guys, but transcribing a few email exchanges into a book isn't cool.

  26. Application Programming by Zobeid · · Score: 4, Insightful

    What ever happened to programming stand-alone application programs? For several years now I've seen almost nothing discussed on Slashdot other than web programming. It's all about scripting websites and accessing databases, etc. Is application programming no longer interesting, or profitable, or fashionable? Is it an activity now considered contemptible?

    Looking at Java, the only thing I found interesting was the ability to write platform-independent applications. Even for that, Java appeared to have some significant shortcomings. I'm sure I'm not the only one who felt that way -- considering how few stand-alone Java apps I have installed on my computer now. Let me count. . .

    Three. I have three Java apps. I have more apps built in REALbasic than in Java. So much for Java taking over the world, eh? And now people are buzzing about Ruby. Ruby? Man, it's an *interpreted* language! If I were coding a CMS, sure, I'd consider it. I may use it as a scripting language for my apps, it should be very spiffy for that. Will I code the apps themselves in Ruby? No!

    Recently I've been learning my way around Mac OS X, with Objective-C and Cocoa. It's not perfect. But. . . For what it's designed for, for developing stand-alone GUI-based applications, I haven't seen anything dramatically better. And you know, I have doubts about whether I'm ever going to. Nobody is working on languages oriented toward application programming anymore. Some of the newer languages can do it, but they aren't focused on it. Apps and GUIs are a sideline, an afterthought.

    1. Re:Application Programming by bnenning · · Score: 2, Interesting

      Ruby? Man, it's an *interpreted* language!

      The large majority of most code in a typical application is not CPU-bound. Deciding at the outset that you have to use C or a similar language for performance reasons is often a premature optimization.

      Recently I've been learning my way around Mac OS X, with Objective-C and Cocoa. It's not perfect. But. . . For what it's designed for, for developing stand-alone GUI-based applications, I haven't seen anything dramatically better.

      The Cocoa API is great, and ObjC is about as good as a language can be with the constraint of being compatible with C. But my next Cocoa app will use PyObjC. If performance becomes an issue I'll rewrite the critical portions in ObjC, but I don't expect to have to.

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
  27. What about C# on Mono by mythz · · Score: 2, Insightful

    C# runs just on well on Mono.

    >slow, slower,

    It is just as fast if not quicker than Java, and can actually be used to create performance acceptable GUI's.

    >hillariously ad-hoc,

    The .NET Framework has a more feature rich consistent API that 'actually follows their own naming conventions' and doesnt need 2 different attempts at writing Date classes (and still getting it wrong).

    >and owned by Microsoft.

    Mono unlike Java, is 'open source'.

  28. Don't confuse dynamic with weak typing by dmeranda · · Score: 4, Informative

    You, like many people, seem to be confusing two independent concepts: static v. dynamic, and strong v. weak typing. Read up here: http://en.wikipedia.org/wiki/Datatype

    Dynamically typed language like Python or Ruby are also strongly typed. This means that the language absolutely *prevents* you from accessing an object incorrectly (breaking type safety).

    C on the other hand is statically typed, but also weakly typed....the exact opposite!

    C++ and Java are also in the same camp--static and weak; although both are much much closer to being strongly typed than C ever was. Although you can argue that Java is static/strong except for some low-level exceptions; or that C++ is partly dynamic (with template meta-programming)

    Just for completeness, assembly is most always dynamically/weak; and Haskell is static/strong.

    BTW it is the weakly-typed behavior of C (casts, void pointers, array bound checking, etc) that causes probably 95% of all type-error bugs. In fact this falacy that dynamically typed means the same as weakly typed is probably the primary reason that so many people seem opposed to dynamic typing. Dynamic != Weak.

  29. java compared to scripting languages? by walterbyrd · · Score: 2, Interesting

    I haven't done any real programming in a long time.

    Is it sensible to compare java with purely scripting languages? I think python is a great language - as scripting languages go. But, I don't think I would try to write a substantial application in anything that doesn't enforce pre-declared variables.

  30. the mmap() illusion by quatrevingts · · Score: 2

    To clarify, Java doesn't even load in the entire library at startup: it simply gives the library a virtual address (via mmap()) so that it can be automatically loaded by the OS when it is actually needed. This resuls in less actual memory usage because different processes can share the memory pages, but it makes each process in top appear much larger.

    However, to combat the illusion that Java uses a ton of memory, they're changing it in 1.6. Full details here: http://weblogs.java.net/blog/xiaobinlu/archive/200 5/08/perception_real.html

  31. C, C+, Bloating by billstewart · · Score: 2

    I'd have said that C bloated _precisely_ by becoming C++ (and ObjC, Visual C++, etc.). Sure, there are other things that have been added since K&R v1, but mostly it was the "let's take C and add object-oriented programming" that opened the door to lots of new complexity.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  32. Heard it all before.... by kaffiene · · Score: 5, Insightful

    I've heard this crap before, and usually on slashdot where the editor's BIAS against Java is demonstrated ably by the utter crap anti Java FUD they promote to the main page.

    Java is omnnipresent in the marketplace and contra the usual /. FUD, that is not because of "marketing" or "hype". You can't survive over a decade on hype - eventually you need to walk the walk, which Java has done and is still doing.

    Java utterly dwarfs Ruby or Python in the workplace, and that's not because Ruby needs more time - Ruby has been around for ages already, it's just not what people want to use. The fact that Rails is a nice solution to ONE single problem domain doesn't make the Ruby language a success - in fact, a simple perusal of the numbers shows that Ruby doesn't even figure. Go read the book sales numbers for Ruby - all but nonexistant compared to Java.

    Show me where the tool support for Ruby is. Show me Ruby for cellphones, show me Ruby on embedded devices. Show me enterprise level Ruby. Go look at eBay - running Java, go look at Google - running Java, go look at IBM and Apple - strong proponents of Java. Why? Not fucking hype, but because it does the fucking job well - DESPITE the bleating of whiney assed slashbot fan boys. Grow the fuck up, Java is successful because it is good at getting stuff done. End of story.

    Sourceforge is now dominated by Java - more FOSS is coming out made in Java than C or C++. Compare the supposed "Java killers" like C#, Ruby - they don't even figure.

    This whole "Java is dead" thing is utter crap and merely reflects the /. editors' own bias against the language.

    Java will be superceded at some point, all languages fade from the number one spot at some point, but none of the current crop of tin pot alternatives being bandied around on /. will be the language to do it.

    1. Re:Heard it all before.... by kaffiene · · Score: 2, Insightful

      "Although I would say it is 'dying'. In some domains of programming, it is not even a contender:
      - Java Applets are being replaced with Flash, Ajax applications.
      - The flood of new Ajax applications are being built with productive agile languages.
      - Windows Applications are being built with Native toolkits, i.e. COM+/MFC,.NET Windows.Forms, QT, GTK, Obj C, etc."


      (1) Um. No-one uses Java Applets. They were a 'neat idea' a decade ago - they're not "being replaced" - they're long gone. Java went on and made new ground after applets were dead and buried.

      (2) Ajax is not an opposed-to-Java-technology - Java works fine with Ajax. You still have servers with Ajax, servers is a space that Java owns. Jeez, even Sun's Java Studio Creator 2 tool (free) supports Ajax directly.

      (3) Native windows apps? When has that *ever* been a space that Java owned?
      If anything, the Java desktop story is improving - it's gone from non existant to a small presence.

      I mean, you raise Web2.0 like somehow that's opposed to Java? What the hell? A language which has been designed to work on the web from the get-go is hardly going to suffer because of Web BUZZWORD two dot oh.

  33. Re:java growing old.... by kaffiene · · Score: 3, Insightful

    You've never done anything in Java yet you know all about it? I present the typical Slashbot slackjaw.

    "Java is an advertising name"????

    FFS, this is typical anti Java FUD. You don't go from new to used by IBM, Apple, Google, eBay, most fortune 500 companies in the world by advertising. People like IBM and Google have actual engineers -you know, people with brains. The kind of people who probably even try technologies before presuming to pass judgement on them.

    Moron.

  34. Re:beyond? by uptoeleven · · Score: 2, Informative

    for small and even medium sized sites you're right, of course. Using WARs is an unnecessary pile of pants EXCEPT that it makes your site portable. If your server dies, you copy the war (a single file) somewhere else and your site's back.

    When you start getting into bigger sites with clustering and multiple layers & tiers and whatnot WARs kind of bring sanity to the front-end. You create a WAR, you distribute it across the presentation-layer servers and you have a handy package with which to build a presentation server. If you have load balanced across 2 servers and you need it across 4 WARS are really handy for the distribution of that code.

    They can be an almighty faff though.

  35. Send it by E-Mail by krischik · · Score: 2, Interesting

    How about sending "Hello World!" by E-Mail? In Java you just use the appropiate E-Mail class and the programm will only be about 3 lines larger. Those 3 lines will set FROM, TO and SUBJECT.

    I am not a fan of Java - but I think comparting languages like this is plain stupid - because you are not comparing languages but the libraries.

    printf is not C - it's a C library function.
    OutputStreamWriter is not Java - is's a Java library class.

    Shure the standart libraries. But they are library function which you can replace if you don't like them.

    What you can't replace is:

    unsigned int = -1;

    or

    char const y[] = "Hello World!";
    char x[5];
    for (int i = 0; y[i] != '\0'; i++)
        {
        x[i] = y[i];
        }

    These are language features. Both show a common bug not detected by the compiler. A library can be replaced by a better one - a bug generating language feature will be with you all the time. No matter how much experience.

    When I did C/C++ work I was hunting down bugs based in integer ranges, buffer overuns, dangeling or null pointers all the time.

    Now I have an Ada assignment and those kind bugs are all gone. If it compiles it runs. I am a happier man now.

    There is more to a programming language then the count of lines for "hello word".

    Martin

    PS: I did not use strcpy (which does the very same) because I want to show languages features.

    PS2: Declaring a variable inside "for" has become valid for C99.

    PS3: Hello World in Ada:
    http://en.wikibooks.org/wiki/Ada_Programming/Basic

    PS4: Integers in Ada:
    http://en.wikibooks.org/wiki/Ada_Programming/Types /range

    PS5: Arrays in Ada:
    http://en.wikibooks.org/wiki/Ada_Programming/Types /array