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.

517 comments

  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 Anonymous Coward · · Score: 0

      Ruby (on Rails) is too simplistic, in my opinion, a few commands and you have a full website up in no time, albeit, without very much control over the internals. I was tempted to learn it, read a few tutorials, and ran back to PHP. No matter how many people say PHP sucks, I still love it. Too bad I can't get work to get away from ASP.

    4. 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."
    5. 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?
    6. Re:Ruby's Quite Nice, Really by Vlijmen+Fileer · · Score: 0, Flamebait

      That is because hardly anybody uses those; bloat comes with popularity.

    7. 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.

    8. Re:Ruby's Quite Nice, Really by AKAImBatman · · Score: 1

      The REAL solution is not to put everything and the kitchen sink in the language itself.

      I'm thinking that's why the language doesn't have a lot. It's got WAY fewer features than even C.

      The language should be a syntax specification,

      It's not. Those are called libraries. Repeat it with me class, llllliiiiiibrrraaaaarrriiiess.

      not an implementation of every obscure library you could ever think of.

      So Linux shouldn't follow the POSIX specification, GNOME shouldn't standardize APIs, and Apple should drop the NeXTStep APIs? Why, you're right! Everyone should revert to rolling their own solution for EVERYTHING! WHAHAHAHAA! Chaos is where it's at! </sarcasm>

      Outside methods similar to CPAN and BOOST do a far better job of being library repositories.

      CPAN and BOOST are library repositories. That doesn't stop PERL or C++ from having a base library set. Nor do the large number of third party libraries stop Java.

      To get back to the point that went WHOOOSH over your head, the Java VM is the part that needs to be an OS component to completely elminate the perceived "bloat" problem by moving it to the best location for it to do its job. This is already common in cell phones and many other portable devices.

      Make no mistake, the Java platform is very much a super Operating System on top of the host system. There's no other way to completely abstract code from an OS. All other cross-platform implementations at some point reference back to the parent system. In many cases, the portability of code is based on the portability of the native libraries it interfaces with. Java doesn't have that problem. In fact, you'll find that most Java libraries are written in Java. (Unlike most of CPAN.)

      Java does its job well. Recognizing its design can only improve the situation further.

    9. Re:Ruby's Quite Nice, Really by the+eric+conspiracy · · Score: 1

      The Java language IS a syntax specification, and a quite elegant one at that. The library stuff is however what gives it great flexibilty - the libraries are far more well integrated than the potpourri that you get from sites like CPAN, making a logical whole that is unrivaled.

    10. Re:Ruby's Quite Nice, Really by SnapShot · · Score: 1
      The REAL solution is not to put everything and the kitchen sink in the language itself.

      I think that's exactly what the GPP was saying. Java isn't and implementation of "every obscure library you could ever think of" though it does have available every obscure library you could ever think of if you want to use them. The only thing CPAN or BOOST give you is either a repository of every obscure library/module (in CPAN's case) or a preview of what's going to be the standard obscure libraries of the future (in BOOST's case). As far as interface design is concerned, the obscure libraries that have nice designs get used and the un-usable ones don't.

      In any case, the incorporation with an OS (which Sun has an interest in pursuing, of course, and Microsoft will never do again since they aleady did it with .NET.) is more of a JVM issue and not a language issue. If anyone ever proposed a Java Language specification change that read "all libraries must be loaded by the OS into memory on startup of the operating system" they would be laughed out of the room.

      --
      Waltz, nymph, for quick jigs vex Bud.
    11. 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.
    12. Re:Ruby's Quite Nice, Really by AKAImBatman · · Score: 1

      Slight correction:

      The language should be a syntax specification,

      It's is just a syntax specification. The rest of that stuff you're complaining about are called libraries. Repeat it with me class, llllliiiiiibrrraaaaarrriiiess.

    13. Re:Ruby's Quite Nice, Really by shmlco · · Score: 1
      Personally, I think JSP and Java web servers need to be more automatic. As the article states, if I create a Java Bean I have to make an Ant script, compile the bean, package it, deploy it, make sure it's in a class path, and so on. OTOH, ColdFusion is built on top of Java. All I have to do there is create my component (CFC) and save the text file to the server using RDS. CF notices the text file has changed, reloads it, does a JIT compilation, and runs it--all automatically.

      What Java needs is less hassle, letting the computers do the grunt work.

      --
      Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
    14. Re:Ruby's Quite Nice, Really by jcr · · Score: 1

      C is still tremendously popular, and it didn't bloat up the way C++ did.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    15. 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?
    16. Re:Ruby's Quite Nice, Really by AKAImBatman · · Score: 1

      All that hassle is there for a reason. As someone who has to support various CFMX applications (*shudder* What a mess.) I can testify that poor release process is a guaranteed way to create a maintenece nightmare. Java's packaging scheme is easy to automate and provides a guaranteed release methodology that will get you a complete application every time.

      Now you don't have to use it (JSPs can be referenced directly, and reloaded on the fly), but it does make things work so much better.

      All I have to do there is create my component (CFC) and save the text file to the server using RDS.

      This is effectively the same thing as creating a JSP include file with embedded Java. Same results. :-)

    17. Re:Ruby's Quite Nice, Really by starwed · · Score: 1

      The fact remains that every java built app I've downloaded has been both incredibly slow to start up, and takes a huge chunk of RAM. Sure, I'll probably replace my 4 year old computer soon, and then it won't matter. But in the meantime, it does.

    18. Re:Ruby's Quite Nice, Really by Anonymous Coward · · Score: 0

      $ du -shD /opt/java
      141M /opt/java


      Yeah, that's not bloated AT ALL! Just 141M!

      $ du -shD /usr/lib/python2.3
      24M /usr/lib/python2.3


      Of course, I'm being unfair there. The Python directory includes the source AND the precompiled libraries.

    19. Re:Ruby's Quite Nice, Really by Anonymous Coward · · Score: 0

      Of course, I'm being unfair there. The Python directory includes the source AND the precompiled libraries.

      So does the Java distribution, genius. What do you think is taking all the space?

    20. 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
    21. 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.

    22. Re:Ruby's Quite Nice, Really by masklinn · · Score: 0, Troll

      The Java language is quite simple, a lot simpler than Ruby for example.

      I know you must be joking when you say that, but part of me fears you're serious.

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

      Ruby (on Rails) is too simplistic, in my opinion, a few commands and you have a full website up in no time, albeit, without very much control over the internals.

      This alone shows how you haven't even tried to know what Rails is.

      Rails doesn't give you "a full website up in no time in a few commands", what it gives you is a mere base, something like 40locs you don't have to type for every table you have in your db.

      Then, it gives you full and complete control over what you want or don't want to do, how you want to set your site, what you want to display and where.

      Scaffolding is the little twinkie that gets you started, but by the time you get anything actually worth using 95% of the code generated by the scafolding util will have disappeared into oblivion, either edited or completely wiped out for being utterly unneeded.

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

      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.

      First: Do you have any real life experience with professional programming? If so, have you ever wondered about tools, maintainability, etc?

      Second: Bloated? How? Most of additions in Java were in the library and that is good. The language itself change little in 10 years.

      I believe some people underestimate the time-saving factor of a good library and overestimate the language syntactical sugar.

      I think this Ruby thing is about a book author and a publisher trying to get some money by "inventing the next big thing", plus a bunch of geeky teenagers that never worked in their lives making noise.

    25. Re:Ruby's Quite Nice, Really by Anonymous Coward · · Score: 0
      Java, on the other hand, is much too bloated.
      And Ruby isn't???
    26. Re:Ruby's Quite Nice, Really by Doctor+Memory · · Score: 1

      Probably more due to the fact that Java apps tend to be big -- not because Java is "bloated", but because Java's OO-nature makes it easier to write large apps. I've written little command-line utilities that don't take appreciably longer to start than others written in C. Large apps like ArgoUML may take longer to start, but once you're in them you're there for a couple of hours, so an extra ten seconds or so on the front end really isn't going to make any difference.

      --
      Just junk food for thought...
    27. 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.

    28. Re:Ruby's Quite Nice, Really by Dolda2000 · · Score: 1
      "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." ... "loading all those libraries into memory at startup." ... "Thankfully, systems today have tons of memory and disk space."
      So basically, you agree that it's bloated? :)

      Personally, I'm having a hard time seeing how a language which makes a "Hello World" program take a tenth of a second of CPU time and 50 MB of VM size to execute could be considered un-bloated, whatever arguments you may have. The fact that you say that making Java an OS component is the best way to solve the problem doesn't exactly make it better.

    29. 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
    30. Re:Ruby's Quite Nice, Really by gbjbaanb · · Score: 1

      Personally, I'm having a hard time seeing how a language which makes a "Hello World" program take a tenth of a second of CPU time and 50 MB of VM size to execute could be considered un-bloated, whatever arguments you may have.

      ah, well its not a good analogy is it - that little, do nothing program is 99% Java framework and 1% your app. Turn it into a larger scale, enterprise application and it'll be 20% framework, 80% app. Which is still totally unacceptable as some of the enterprise apps I have deployed already use gigs of RAM anyway (it wouldn't be a en enterprise scale application if it did little). Writing such things in Java would just make them un-deployable on servers with only 4Gig!

      Imagine running 2 of these serious applications on the same server! Impossible. Quick! more hardware required!!

      So yes, I agree - throwing memory at a problem doesn't solve the problem!!

    31. Re:Ruby's Quite Nice, Really by Trejkaz · · Score: 1

      Thing is, the very same app written in Python or Ruby would still be bigger, and yet you never hear anyone complain about that.

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
    32. Re:Ruby's Quite Nice, Really by Trejkaz · · Score: 1

      IMO, you're supposed to use the right tool for the job. If Java is taking up too much world for your time-critical Hello World app (if there even is such a thing as a time-critical Hello World app) then use something lighter.

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
    33. Re:Ruby's Quite Nice, Really by shmlco · · Score: 1

      It's not so much the release process, as the development process, which still requires the distinct build and compilation stages. Or making changes to a bean and needing to restart java. 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.

      --
      Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
    34. Re:Ruby's Quite Nice, Really by shmlco · · Score: 1

      You mean, as opposed to a simple Hello World cgi script that depends upon a quarter of a gigabyte of operating system code?

      --
      Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
    35. Re:Ruby's Quite Nice, Really by Tyler+Durden · · Score: 1
      I'm thinking that's why the language doesn't have a lot. It's got WAY fewer features than even C.

      Errrrrr... what the fuck are you talking about? Java has far more keywords than C. The one major feature C has that Java doesn't is manipulation of pointers, and that adds very little to the language itself. Maybe you're talking about the C preprocessor, but that hardly counts.

      Just what strange, fantasitcal definition of the word "features" are you using?

      --
      Happy people make bad consumers.
    36. Re:Ruby's Quite Nice, Really by Anonymous Coward · · Score: 0

      The Hello World argument is absolutely idiotic. I wonder about programmers who complain about this... Is Hello World an accurate portrayal of one of your projects? Use the right tool for the job. If for some odd reason all you write is Hello World programs then Java is probably not the best solution for you.

    37. Re:Ruby's Quite Nice, Really by Anonymous Coward · · Score: 0

      How many pages are in the C99 language standard vs. the C++1998 language standard? Hint: They're pretty close to the same length.

    38. Re:Ruby's Quite Nice, Really by Anonymous Coward · · Score: 0
      If you're excluding lisp and smalltalk then it's just because you're talking about the language and not the "standard libraries" smalltalk and lisp are huge. Nobody writes pure smalltalk or lisp, they use common-lisp or some totally tricked out smalltalk rather than spending a decade building the standard library before you really start working on the project at hand. Java and Ada are fairly simple languages with large libraries also. I suspect Ruby won't change that much, Python hasn't undergone any dramatic change. Even C++ isn't that complex, there is a fair chunk of syntax but it doesn't seem that over powering, now the STL code is freakish looking.

    39. 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.

    40. Re:Ruby's Quite Nice, Really by Anonymous+Brave+Guy · · Score: 1

      The C and C++ standards might be roughly the same length, but when you look inside, you'll find that the latter basically says "...oh, and throw in everything in C, too". C++ is a vastly more complicated language, whether or not you're including standard libraries.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    41. 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.

    42. Re:Ruby's Quite Nice, Really by badmammajamma · · Score: 1

      You must be kidding. Please explain to me how those to pages show java as being more complex.

      --
      Any man who afflicts the human race with ideas must be prepared to see them misunderstood. -- H. L. Mencken
    43. Re:Ruby's Quite Nice, Really by synthespian · · Score: 1

      Oh, but Ruby is already bloated in a way. It has bits of Perl and Smalltalk here and there, without being neither, having a slow performance and a bad design. Do they have modules or some such mechanism in Ruby yet? - I look at it periodically for 3 years, and last time I did, namespaces were still a problem.

      (Oh, by the way, if you're one of those who think Perl is just sooo stupid and dead, I suggest two books: Higher Order Perl, and Object Oriented Perl.)

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    44. Re:Ruby's Quite Nice, Really by mclaincausey · · Score: 1
      You must be kidding. Please explain to me how those to pages show java as being more complex.
      No, I'm not kidding. Do you want me to explain how to read BNF, or are you saying that the BNF doesn't conclusively, empirically prove Ruby has a simpler syntax than Java? Java's BNF has 64 productions, Ruby's has 44. Case closed.

      I'm not saying that means anything past that fact, I'm just correcting misinformation. I like both languages, and they both have their uses.

      --
      (%i1) factor(777353);
      (%o1) 777353
    45. Re:Ruby's Quite Nice, Really by synthespian · · Score: 1

      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.

      Absolutely right. This Java got right: a simple language, with simple rules. Kinda like Eiffel, Smalltalk and Scheme did too. I think this is a good principle, because once the libraries grow to a large size, the "dark corners" in a language begin to cast their shadows. It avoids the toll on the programmer's cognitive ability that weighs down on the faculty of attention. You get "master hackers", and obscure code. Some people monkey the meme that coding in Java can be a non-creative activity, but this has really nothing to do with Java per se.
      How you approach complexity is a different issue: macros and generalfunctionology in Scheme, bondage-and-discipline in Eiffel, industrial "machine tools" in Java (all those great IDEs). But the amount of black magic is reduced. I hear horrible things about C++ in this respect.
      Perl is much convoluted, but in a good way, by design, because of the linguistic principles thrown in it. But this would be a whole new thread and one aspect that few people understand, or seek to understand (preferring to call Larry Wall by ugly names).

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    46. Re:Ruby's Quite Nice, Really by synthespian · · Score: 1

      As if anyone writes "Hello World."
      No, sorry, that is a non sequitur.

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    47. Re:Ruby's Quite Nice, Really by shutdown+-p+now · · Score: 1
      IDEs are certainly getting there. Try RDT, and, for Rails development, RadRails - both are plugins for Eclipse, and very good ones at that.

      Documentation, though, remains a problem. We have good books (even if few), but no decent library reference. This is annoying.

      And, of course, there are still a few other problems with Ruby itself, such as lack of decent Unicode support.

    48. 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.

    49. Re:Ruby's Quite Nice, Really by mikek3332002 · · Score: 1

      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. :-)
      That method of thinking is why windows vista requires so much memory.

      What Java has is an extensive set of libraries that provide all kinds of common functionality.
      What about console opperations eg read input from console?

      The only real solution to this dichotomy is to make Java an operating system component.
      Think about IE

    50. Re:Ruby's Quite Nice, Really by shmlco · · Score: 1

      Thanks for the tips.

      --
      Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
    51. Re:Ruby's Quite Nice, Really by EsbenMoseHansen · · Score: 1

      Eh, no thanks. There are several things wrong with this approach.

      1. Java is just another language. Why JVM? Why not Parrot? Perl5 VM? Ruby VM? Before we know it, we'll have dozens of VM permanently in-memory
           
      2. Any decent OS will swap out the JVM is not used for some time. Which means that the JVM will be loaded from swap in any case, thus negating most of the boost gained.
           
      3. JVM's are typically not compatible. I have 3 java application application on my desktop, and they all require specific versions of JVMs. Poor coding? Probably, but Java apps tend to be poorly coded, whatever the reason might be.

      As for the library management, that is a conflict between the windows way (every application has its own copy of all libraries) to the UNIX way (package manager automatically installs any needed library, handling version conflicts etc automatically). I like the UNIX way better, for obvious reasons, but I won't argue that case today :)

      --
      Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
    52. Re:Ruby's Quite Nice, Really by ultranova · · Score: 1

      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.

      I wrote a quick Java program that does nothing but enters infinite loop ( while(true); )to test this. Top reports the RSS size as 9532 (I can only assume the unit is bytes), so either Java developers managed to squeeze their libraries really tight or your hypothesis is incorrect ;).

      Mind you, "Size" is 259M, so I guess they do some memorymapping tricks here.

      Anyway, I tried to write a Java image viewer program, and wondered why the heck the scaling algorithm was so slow. Turns out that the "getRGB" method of BufferedImage class is the culprit - the data simply gets routed through too many layers. Now I'm faced with the choice of either making my own image class or abandoning the project. Aarrgghh.

      And, of course, it turns out that there is some nasty bug there too - if the image is in any colorspace but the default, the scaling algorithm is ten times as slow as usual. AARRGGHH.

      Oh, and for anyone wondering why I was doing an image viewer in Java: I needed practice, and the current combo of Nautilus and EOG have some serious problems: Nautilus has a habit of locking up for a while randomly (strace reveals that it is busily reading and/or writing thumbnails shouldn't that be a job for a background thread ?) and predictably (every time I open a directory with lots of files in it), and EOG takes a long time to start (and randomly fails to start at all), especially if there's already some EOG windows open - I can only presume that it "registers" itself with Gnome somehow, and that this behavior doesn't scale, since no other program shows this syndrom.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    53. Re:Ruby's Quite Nice, Really by Balp · · Score: 1

      Btw, sun have a "correct" java grammar on there site:

      http://java.sun.com/docs/books/jls/second_edition/ html/syntax.doc.html

      (I however think thats an old version of Java. found it with google.)

      / Balp

    54. Re:Ruby's Quite Nice, Really by mclaincausey · · Score: 1
      And you conclude that from those buggy BNFs you linked to? Or something else?
      The "buggy BNF" for Ruby is listed in Ruby's documentation. Matz himself probably wrote it. You want to call the BNF for Java "buggy," fine. First of all, look at the actual BNF instead of the hypertext: here. Second of all, there's another Java BNF here that's even hairier. Third, have you programmed with both languages? It's freaking obvious that Java's more complex if you have. There are many more lines to accomplish the same tasks, and commands like System.out.println() accomplish the same thing as print in Ruby. If you look at code from both languages side by side, Java will have more lines, more commands, and longer commands. The only time this might not be the case is when you're doing something that involves heavy use of libraries, and perhaps Ruby doesn't have a mature library for whatever you're doing.

      Ruby:
      puts 'Hello World!'

      Java (must be in file: "Hello.java"):
      public class Hello {
      public static void main(String[] args) {
      System.out.println("Hello world!");
      }
      }

      Er, hello? I know you were only criticizing the BNF's I cited, but think we can put all this "java is simpler" garbage to rest now.

      --
      (%i1) factor(777353);
      (%o1) 777353
    55. Re:Ruby's Quite Nice, Really by henni16 · · Score: 1

      AFAIK you don't have to restart tomcat either.
      There was some (server.xml?) setting you could enable for hot deploy. But to be fair, I didn't trust that setting to always work back then.

      But what Tomcat 5 has (and what I'm sure of that it works) is its manager webapp for (remotely) deploying webapps.
      Now, a web interface isn't a nice thing to use for deploying during development but there are ant tasks to automate the whole thing:
      Ant Tasks for remote deploying on Tomcat

    56. Re:Ruby's Quite Nice, Really by Anonymous Coward · · Score: 0

      How did your image viewer in Ruby turn out?

    57. Re:Ruby's Quite Nice, Really by wft_rtfa · · Score: 1
      Java, on the other hand, is much too bloated.

      People keep repeating this, but it just isn't true.

      I love Java. It's awesome, but it's a little bloated. Sun had to design the platform in such a way that it can run the same on multiple platforms. This causes some bloat. Have you seen any Swing code? It is big and bloated. But it's that way for a reason. Although, it probably could be done better. However, now that computer hardware is getting so fast, the bloat is hardly noticable on new hardware.

      --
      :-] :0 :-> :-| :->
    58. Re:Ruby's Quite Nice, Really by Anonymous Coward · · Score: 0

      Yes, and they are also all (nearly) extinct.

    59. Re:Ruby's Quite Nice, Really by jsight · · Score: 1

      Your Java numbers are not quite accurate. Here are some Hello Worl numbers:
      $ time java -cp . Test
      Hello world!

      real 0m1.408s
      user 0m0.015s
      sys 0m0.031s

      As you can see, that's 3 hundreths of a second, not 1 tenth.

      Also, the heap was only about 12 megs vs. your estimate of 50. :)

    60. Re:Ruby's Quite Nice, Really by Jason+Hood · · Score: 1

      Think about this:

      1. Java is far more reboust and atmoic than Parrot and Perl5. But its all preference.
      2. There is a huge difference between loading swapped memory rather than reading data from disk and loading the classes in the VM. Loading from swap would take 1-2 seconds at the most. The first load of a JVM takes 5-6 seconds.
      3. That _is_ poorly coded java. I believe this problem is not nearly as prevalent as it was 2-3 years ago but is still and always be an issue with all platforms.

      In any even preloading a JVM should be an option, an user configurable adapter pattern. There are few applications these days that require native code. JIT environments are the future (In my opinion).

      --
      Are you intolerant of intolerant people?
  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 WindBourne · · Score: 1

      Yeah, I keep saying the same thing about Z-80 assembler and dos shell. And yet, they are not in the number one position

      --
      I prefer the "u" in honour as it seems to be missing these days.
    5. Re:D programming by Jugalator · · Score: 1

      Why's that? It barely even have any adopters. It's among the languages I *don't* see a big future for.

      --
      Beware: In C++, your friends can see your privates!
    6. 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.
    7. Re:D programming by aminorex · · Score: 1

      It's seeing plenty of use, in the form of the GCC D compiler. But it's no web development system.
      For that, I would bet on Scheme, were the implementation scene not such a mess. (Scheme being the most accessible of the Lisps).

      --
      -I like my women like I like my tea: green-
    8. 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.
    9. Re:D programming by Anonymous Coward · · Score: 0

      Most languages are getting higher level and getting rid of explicit pointers. D seems to keep them around. Not one I'd favour for any pet project of mine. And without much industry backing, not one I'd favour for professional projects either...

    10. Re:D programming by IamTheRealMike · · Score: 1
      Right, it's not "in" currently because there's no compelling reason to use it. But look at what Ruby on Rails did for Ruby - up until RoR nobody really cared about Ruby and now it's the new hotness.

      The world is crying out for a desktop/clientside development language that isn't total crap, and D is it. All the benefits of Java/C# as a language, with native code compilation and efficient memory usage characteristics - now all it needs is a RoR equivalent for the desktop.

    11. Re:D programming by HiThere · · Score: 1

      D's an excellent language, but for right now you also need to be a C programmer, because the libraries aren't yet where they need to be, so you need to write linking routines in C. Easy enough to do, even if you don't really like C, but quite an unnecessary nuisance.

      That said, it *is* a relatively easy thing to link C code with D code, so all you need to write is a controllable wrapper around the parts of the library that you intend to be using. (This could be solved easily if D could include C's *.h files, but that is, apparently, a hard problem.)

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    12. Re:D programming by chris_eineke · · Score: 1
      You can write an OS kernel in pure D.
      At which point it becomes purdy...
      --
      "All you have to do is be fragile and grateful. So stay the underdog." Chuck Palahniuk, Choke
    13. Re:D programming by synthespian · · Score: 1

      Systems programming as we know is dead in the long run.
      It won't matter what OS you use in the future. What matters is if you can run distributed applications. The OS will just be the thing you install the software for the grid on. The grid is not the OS, but "the Net is the computer."
      It won't matter unless, that is, your OS is specifically designed for grid computing, like Inferno or Plan 9.
      In that sense, distributed computing in Java is far, far more relevant (let's also cite Erlang and Oz here).

      Let those Linux hackers stick to C, it won't matter, the OS will be a small part of a bigger scenario. As to safety in C, all it takes is the automated tools for source code verification. Too bad the open source community couldn't care less about source code safety analysis.

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    14. Re:D programming by CondeZer0 · · Score: 1

      The "D" name is misleading: it has absolutely nothing to do with the creators of B or C at Bell Labs. The successor of C was Alef(the first latter of a different alphabet) which was used for the original edition of Plan 9[1], and a later descendant by the same team was Limbo(Introduction paper by no other than Dennis M. Ritchie) for the Inferno.

      Both Alef and Limbo are much more interesting languages than "D", they keep the clarity and simplicity of C while providing a high level framework for concurrent systems. The only other language with a good concurrency model I know of is Erlang which is quite different but also very interesting and sadly rather under valuated.

      uriel

      [1] To avoid having to maintain Alef compilers for many architectures Plan 9 is ported to, it was replaced with a C library, libthread, that provides the same concurrency model, for high level programming Limbo replaced it. Libthread, despite it's name is completely different from other threading models and uses CSP to handle concurrency while avoiding locks and many other problems with traditional "threading" systems. Libthread is part of Plan 9 from User Space so you can use it in "legacy" Unix/Linux/BSD systems too(of course Inferno runs on all those systems too...)

      --
      "When in doubt, use brute force." Ken Thompson
    15. Re:D programming by clayasaurus · · Score: 1

      Is there any other systems language improvement of C++? D is the only choice here.

    16. Re:D programming by Anonymous+Brave+Guy · · Score: 1

      You presuppose that D is an improvement on C++. To me, it's a language that's aiming at the same market, but whose designers didn't understand why decisions about C++ were made the way they were, and thus made the wrong decisions instead (for a language aiming at that market). Java and C# suffer the same drawback.

      There are plenty of things to improve in C++ if you're going to write a language for a different target audience, but in that case, I don't think a Java/C#/D style language is ever going to be a natural heir to the throne.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    17. Re:D programming by Anonymous+Brave+Guy · · Score: 1
      Systems programming as we know is dead in the long run. It won't matter what OS you use in the future. What matters is if you can run distributed applications.

      So the hype goes, but I can't see it. Many (almost all?) applications simply aren't meant to run in a web browser or whatever, and once you've got to the stage of basically downloading the current version of some software on demand, you're not really running a distributed app, you just have a smarter installer.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  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 altoz · · Score: 1

      oh geez... here come the "you can't compare the two" arguments again. programming is a tool. if you can get the same things done using perl and java, then the two can and SHOULD be compared. perl does replace java in many places and can do anything that java can do. same can be said about python, ruby and a host of other languages. you might need to write more libraries, but the actual projects can be done in any language. it's just a matter of how easy and maintainable doing the actual project is that matters

    2. 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

    3. Re:Comparison with perl?? by kfg · · Score: 1

      Comparing with C# is much better and should be more detailed.

      Maybe what you need is an orange, instead of switching from Spanish peanuts to Blanched.

      KFG

    4. Re:Comparison with perl?? by Tumbleweed · · Score: 1, Funny

      Perl is a scripting language to do things more neatly than C/C++

      _MORE NEATLY_?! _PERL_?!

      Uhm, okay, then.

    5. 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 Seferino · · Score: 1
      If you mean money as in, well, real money, I can't help you.
      If you mean money as in learning something new and/or spending less time working on the same program, here are a few pointers:
      • less verbose language -- really much less verbose
      • domain-specific languages -- once you've understood a design pattern, integrate it into your language, you won't have to spend your time coding and recoding the same thing
      • a degree of functional programming -- which again means less coding, higher level of abstraction and reusability of your components.
      Plus some people like the syntax immensely.
      Of course, that's also the kind of benefits you can find in, say, OCaml or Scheme. Which of these languages you'll prefer depends on a number of factors I won't detail here. I'm personally a big fan of OCaml.
    3. Re:Show me the money! by Shakes268 · · Score: 1, Funny

      Engineer? More than likely its "Architect"

    4. Re:Show me the money! by gbjbaanb · · Score: 1

      Yes, his job title is probably something like "Professional Application Developer", not "Cowboy Who Plays With New Toys".

      I don't like Java myself, but at the end of the day, you work on the systems your employer tells you to, using the tools and standards they demand.

    5. 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

    6. 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 AKAImBatman · · Score: 1

      Built in reg exp are extreme[ly] useful

      That's right! That's why it's a good thing Java has built-in RegExp support. ;D

    2. 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.

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

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

    4. Re:Perl is not too loose and messy by chromatic · · Score: 1
      The language doesn't encourage clean code.

      Somehow you managed to write clear and understandable English, a language that 14 year olds all over the world use to write text messages and argue on message boards.

    5. Re:Perl is not too loose and messy by Tetris+Ling · · Score: 1
      Somehow you managed to write clear and understandable English, a language that 14 year olds all over the world use to write text messages and argue on message boards.
      It's not my code I'm worried about understanding. It's the 14-year-old's.
    6. Re:Perl is not too loose and messy by masklinn · · Score: 1

      Built in reg exp are extreme useful

      Thing is, ruby has them too, and it still manages to have readable code outside of the regexps.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    7. Re:Perl is not too loose and messy by platos_beard · · Score: 1
      Any langauge can be obfusticated and C is perhaps the easiest to obfusticate.
      And this is a typical response of a <insert name of frequently bashed programming language here> programmer.

      I don't see how you can deny that different programming languages encourage different ways of writing programs. This tends to reinforce itself since the language then attracts people who like to program that way, creating the cultures that surround many languages. Most programmers familiar with the language in question will know exactly what I mean if I write that some chunk of code is written in C, but it looks like Pascal. Oops, make that Python and Java, I'm revealing how old I really am....

      So, if you want to defend Perl, defend it! Tell us why the type of coding encourage by the language or the culture that surrounds it is better than some other language, either in general or for a specific purpose.

      To be honest, I've used Perl only enough to come to dislike it pretty thoroughly. Python, on the other hand, I love and has cause a grizzled old C++ code jockey to consider a completely different understanding of what's important in a programming language. Maybe I'm missing something in Perl. So please, try to explain it to me. I'm listening.

      --
      What's a sig?
    8. Re:Perl is not too loose and messy by Anonymous Coward · · Score: 0

      Perl has like 130 operators while other languages have maybe 10-40 (Java has about 35). There even is a periodic system of Perl operators! Two people writing perl code can use a totally different subset of perl and might be unable to read each others code. Perl is crazy.

    9. Re:Perl is not too loose and messy by Phil+Gregory · · Score: 1
      "Perl's too loose and too messy" please provide some meat to that aspersion.

      Perl is a language that has accreted a lot of different features over the years. That, combined with its attempts to DWIM, can make programming in Perl a very convoluted process.

      Perl does have a lot of things going for it; it's definitely a step up from building text filters out of awk and sed, and there's a good reason it's become the gold standard for regular expressions. But when things turn complex, Perl gets ugly. For an example, look at Perl's approach to object oriented programming. IMHO, Perl requires too much time manipulating the mechanism of its OO programming, as opposed to letting the programmer design the objects and otherwise staying out of the way. You have to manually receive the $self object on method calls. You create an object by "blessing" a variable of a different type. Inheritance is accomplished by maintaining an array of the class's ancestors (which anything could, in theory, mess with at any time). Object-oriented programming in Perl was an afterthought, and it shows.

      Want another example? Context. Having things behave differently depending on whether Perl thinks they should return a scalar or a list (or a string, or a boolean, or nothing...) is very DWIM, but it can make it difficult to understand exactly what a chunk of code will do when it's run. Mostly, that understanding comes down to rote memorization and hoping you didn't forget anything. "Oh, crap. That function, which I usually pass scalars, will take a list, which means that the other function, whose return value I'm using, is going to behave completely differently."

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

      C isn't really an alternative to most things that Perl is used for. Personally, I would argue that C is a systems-level language and is not well suited for application-level programming, but that's an argument for another time.

      I want to address that "Any language can be obfuscated" statement, though. While that's true, the problem with Perl is that the language makes it easy to obfuscate things. One example is, of course, the problem of context that I mentioned above. For another, consider Perl's approach to data structures. While variable type is dynamic (and weak and rather simplistic), data structure is encoded in the name of the variable, as indicated by the first character. And even though that character isn't part of the name itself, there are different namespaces for the different base structures. ('%foo' and '$foo{bar}' are the same hash, but '$foo' is a completely different variable.) Then there's Perl's approach to more complicated data structures, which is either to make a class for them (see above for OO discussion) or to use references and nested structures, leading to things like '$${$foo{bar}}[2]'.

      Perl is certainly a very useful language; it's been my language of choice for jobs where I needed ease of programming, complex text manipulation, or just plain portability. It does, however, have considerbal ugliness beneath the hood that's hard to ignore.

      --Phil (Currently contemplating a switch from Perl to Ruby for my everyday use.)

      --
      355/113 -- Not the famous irrational number PI, but an incredible simulation!
    10. Re:Perl is not too loose and messy by Anonymous Coward · · Score: 0

      Telling perl people about the ugliness of perl is like trying to tell a young earth Christian that the flood never happened. Perl people tend too be a little too defensive.

      But, I'll try.

      One of the glaring uglies of perl is it's OOedness. Perl is no more Object Oriented than C.

      Moreover, parameter passing for Perl is just plain painful. And ugly. And dangerous. TDD isn't desireable with Perl, it's absolutely required.

      Here's the thing - the language should help you write good code. Perl just doesn't do that. Heck, C is a little safer - at least the compiler gives me a warning if I do something retarded. Sure, use warnings; use strict; are helpful, but nowhere near as helpful as a java, C, C++ compiler.

      Now, does that mean I hate perl? Well, yes, actually, it does. On the other hand, perl completely rawks when it comes to parsing. I love the richness of perl modules. Inline::C is really pretty cool. Heck, some perl code is even very readable (Dr. Tom N. this means you.) However, I'd rather watch Hostle in an SM bar than maintain someone else's perl.

      Now, of course you're going to rebuke my rebukal. Possibly you're going to say "Well, you're not an experienced Perl Coder" or "These modules make OO soooo much better." Could be. But the thing is, it's so idomatic that it's very painful. Not a good attribute for something to ahve.

      Finally TMTOWTDI isn't nescessarily a good thing. Perl people point to this as "ooh, I can do the same thing 80 different ways, and they're all wonderful." The thing that the perl people leave out, is those other 79 ways are absolutely inferiour to the way that I, Mr. Perl Guru use. And they aren't shy about telling you.

      Did I convince anyone? Nope. Doubtful. This message was an electronic fart. Made me feel better, but I doubt anyone changed their minds.

      Heck, I'll go one further - one's choice of Languages is much like one's choice of political parties: usually done on the basis of feelings, and as a result, is not changable by logic.

    11. Re:Perl is not too loose and messy by Anonymous Coward · · Score: 0

      |So, if you want to defend Perl, defend it! Tell us why the type of coding encourage by the language or |the culture that surrounds it is better than some other language, either in general or for a specific |purpose.

      Perl is more close to the natural human language...the natural languages are messy u know... but we use them, not something overdesigned (java can be one example of this), but something that grows with our ability to comprehend it and makes us more productive over time not the other way around.

      my 5c

    12. Re:Perl is not too loose and messy by dcam · · Score: 1

      I'll post some.

      1. You can add properties to class instances. That is plain evil.

      2. ability to set your own delimiters on comments

      3. IMO inconsistent syntax. eg a print is: print [filehandle] , but push is: push(, value). Either use commas or don't, but don't mess about half way there.

      4. A massive (and far too complex syntax), with a reliance on cryptic symbols or operators. eg elif, eq (== not good enough for you?), the for opening files, $_.

      I actually like the regex stuff (but I am far from an expert in that area). I just don't see why the entire language has to look like that. And yes you can write elegant, clean code in perl is is just quite hard.

      Don't give me that TMTOTDI crap. Some of the features should not exist.

      --
      meh
    13. Re:Perl is not too loose and messy by Anonymous Coward · · Score: 0

      (new poster, do bear with..)

      I'm a new coder, actually - Perl was my first language due to my job, and has served as a 'gateway drug' to get me into other languages (specifically java and C#).

      So.. why perl?

      Well, Perl - in doing what it is designed to do - exists as a programming language without peer. Perl is designed to manipulate and transform large blocks of data with a 'real-language-like' interface; basically, once you learn the language, it's as easy to code as it is to write a sentence in English.

      The more you use Perl, the more you expand your vocabulary, the more Perl can do for you.

      As an old-new programmer (just turned 30, and just now learning to code) Perl makes sense. This isn't machine-structure, it's very similar to how we speak and communicate in the realm of real human beings. Oh, no - it's not exact; it was a bit of an adventure to learn things like orders of precidence and I still make stupid errors in naming variables and then using a similar-but-capitalized-version later in the program. However, my job requires me to touch 10-20K lines of textfile with 1000+ characters in each line, and parse them for useable information. The ability to simply 'tell' my PC what to do in a very simple line and get immediately useable output is a beautiful one.

      Further, Perl is as structured as you want it to be. Simply adding the line 'use strict;' to the start of any perl script or program puts you into the same compiler restrictions inherent in other languages. At this point, you've got to predeclare variables, hashes and arrays - and more.

      I'm learning Java now - never would have had the courage without Perl - and can see its power and portability. However, I keep noticing that what takes me ten lines in java in declaring classes and assigning values is literally a single function call in Perl. Coming from the direction I do - I have to wonder... why is it important to declare a variable /type/ before you use it? What possible purpose can that serve in development? Perl lets me store my data in a discrete memory spot - a variable name - and it really doesn't care what kind of data that is. It's up to /me/ to use it appropriately at that point. There aren't messy conversions back and forth, either - I don't have to somehow get a time-date stamp out of a time-date variable and put it in a string if I want to print it out in a string context.. perl just lets me do it. No questions asked.

      It's little things.

      OO? Perl actually does OO - once you dig into it enough to understand how it operates. When used with Tk, you've even got a pretty solid GUI for windows, while CamelBones enables GUI development for Mac. Web work? Perl's more powerful than PHP (IMHO) for designing dynamic web pages and integrating with databases simply because the interface to both is so streamlined and simple. The fellow that got me started in perl runs his personal web page (consisting of twenty-thirty individual content pages) out of a single perl script under 1000 lines and a back-end database. One perl script, 30 pages with forms and content and more? Woof.

      No, he's not a designer... neither am I. But the power's there to do a great deal.

      And then there's CPAN and the perl community - chances are, at this point, if there's something you'd like Perl to do, there's a plug in object that'll let you do it with a minimum of fuss. So far, I've had Perl do everything from massive, repeditive MySQL queries and parsing huge datafiles to tearing apart, encrypting, and reassembling PDF documentation, with lots of stuff in between. I've found - at least in terms of raw power - nothing that Perl can't do that I need in a daily language.

      Issues?

      Well, Perl isn't very portable.. as it's not a /compilable/ language, at least not yet. ActiveState has put out the first Perl compiler I've ever seen, and it works on windows... and it incorporates a GUI. It's still fairly bloated, but we'll

    14. Re:Perl is not too loose and messy by EvilSporkMan · · Score: 1

      Perl doesn't do games? Really?

      --
      -insert a witty something-
  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 Anonymous Coward · · Score: 0

      You're right, static typing is great for catching bugs during compile time, but makes object-oriented design less flexible. I was recently using C++ and wanted to implement a design that uses multiple dispatch, but C++ (or any statically typed language) can't do that. Instead you end up with big ugly if..then..else statements using run-time type info to figure out what each object is, casting it to the appropriate type and then passing it to the appropriate method.

    4. Re:Dynamic typing by Arroc · · Score: 1

      I believe that by relaxing the type requirements it allows implementing less rigorously structured architectures. For instance, there is no need to design interfaces for every piece of functionality, member mapping can be achieved by name at runtime. My experience is that whatever time can be saved initially, is negligible next to the scalability/maintenance headache it creates for a non-trivial application.
      While loosely-typed languages are very useful in some situations, in most of the cases a modern static typed language should perform better. Personally I use a combination of Java/Jelly/Groovy ( 80%/10%/10% )

    5. Re:Dynamic typing by Florian+Weimer · · Score: 1

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

      It is much easier to design a usable dynamically typed language than a statically typed one. If the type system is too primitive, it's constantly in your way (especially if, unlike C, the type system cannot be subverted), and beyond that, implementations are very hard from the beginning (for dynamic languages, the troubles start once you want an efficient implementation). Of course, it pays off in the long run to make significant investments at the language design level (and in the compiler itself), but is really hard, and if you try to innovate, you are bound to make expensive mistakes (for the developers using the language, or for you if you try to correct them later on).

      That being said, I still don't see what's so bad about Java the language. Based on the review, much of the author's criticism seems to be concerned with the Java-based frameworks which are currently en vogue, but you can use Java without them. I'm not a real Java fan (mostly because all of the available implementations have significant drawbacks), but I must concede that overall, it's not a poor design.

    6. Re:Dynamic typing by minniger · · Score: 1

      Dynamic typing can cause many of the problems that you refer to IF you don't have automated testing and if you don't write the tests as you develop the classes. If you do test driven development (or just have tests!) you can avoid a lot of these issues. The thought is these tests are roughly equivalent to the type checking that compiler or IDE would do. Plus they are more domain specific that just strict type checking.

      Dynamic typing allows you to get right to solving the problem at hand and not get hung up on types and checked exceptions (different subject, but similar ideas). But it's not clear (to me) that it really saves you anything in the longer term. So personally, I'm still in the 'let's use a good ide and strict type checking' camp. But even so it's clearly overkill for a lot of tasks and something lighter is nice.

    7. 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)

    8. 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.
    9. 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.

    10. Re:Dynamic typing by CastrTroy · · Score: 1

      Shouldn't you be able to use polymorphism to define a bunch of methods with the same names, that take different typed arguments and let the computer figure out which one it's supposed to call at runtime?

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    11. Re:Dynamic typing by cbcanb · · Score: 1

      Dynamic typing basically changes the notion of the type of an object from the question "What are you?" to "What can you do?". As long as the object you're using does something sensible in response to a particular operation, it doesn't matter so much what it is. If it does matter, create the right kind of object in the first place, it's not going to change underneath you.

      Practical applications include easier and more flexible mocking, as well as code that is just generally more flexible and simpler to work with. There's often less of it, as well.

    12. 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.

    13. Re:Dynamic typing by qray · · Score: 1

      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.

      C++ has been handling this quite nicely for years. C# and Java to some extent now as well.

      So by going to a pure dynamically typed language what do I gain again?
      --
      Q

    14. 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
    15. Re:Dynamic typing by arevos · · Score: 1
      I don't understand as a developer what dynamic typing does to help a language, and what real world advantages it offers the developer.

      Dynamic typing allows for classes and functions to be created and altered on the fly. This opens the way to various metaprogramming techniques, which can be extremely useful at cutting down on repetition that can't be solved through static methods or inheritance.

      For instance, I recently wanted to integrate Pygame's event objects into a more general event handling system. In Java, I'd have to create define a new class, plus getter and setter methods, for each event type. In Python, I can create a class factory function that can dynamically generate the new classes for me dependant on a small set of arguments I give it. So instead of needing 15 class files, I can achieve the same result in 15 lines.

    16. Re:Dynamic typing by Coryoth · · Score: 1

      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.

      And just think of the extra time you can save by adding a few annotations to your code and allowing a static checking tool like ESC/Java2 or Splint catch all the extra errors for you. Better yet you can get tools that will extract that extra documentation of the method out and include it in the automatically generated documentation - making it much easier to keept your documentation exact and up to date.

      Jedidiah.

    17. Re:Dynamic typing by minniger · · Score: 1

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

      No. It let's you not worry about them when you just want to get something done. You'll worry about them when you use a lib and pass in a type it's not expecting at runtime. Again, automated testing is important.

      > Source code reduction is a very good thing.

      But it's not the ONLY thing. Readability/maintainability are important too.

      I'd rather work with a slightly more verbose codebase where I can easily track down exactly what types things are so I can figure out what is going on at compile time and not just at runtime.

    18. Re:Dynamic typing by Anonymous Coward · · Score: 0

      No. You run into situations where you don't have enough type information to resolve the method you want at runtime. Let me give you a simple example:

      void someFunction(base& arg)
      {
          cout"base"endl;

      }
      void someFunction(derived& arg)
      {
            cout"derived"endl;
      }

      main()
      {
      base b;
      derived d; //this class is derived from base
      base* ptr1 = address of b; //some reason ampersand doesn't work, but you get what i mean
      base* ptr2 = address of d;

      someFunction(*ptr1);
      someFunction(*ptr2);
      }

      This program will output:
      base
      base

      In a language with multiple dispatch, this would print
      base
      derived

      C++ does static type analysis, so you would have to cast the argument passed in to the appropriate type before calling. You can use a technique called double dispatch to resolve some issues, but this also creates other issues.

      I still haven't created my slashdot account, gotta get to that. been holding it off for a few months!

    19. 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"

    20. Re:Dynamic typing by mad.frog · · Score: 1

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

      Cool!

      So now I can do something like:

              function void foo(const ReallyComplexDataStructure& arg1) { ...do stuff to contents of arg1... }

              foo("Hello, World!");

      and have it somehow work!

    21. Re:Dynamic typing by sammy+baby · · Score: 1

      Sure. And then you're left supporting a half dozen (or however many) functions instead of the one you would have gotten with dynamic typing.

    22. Re:Dynamic typing by Coryoth · · Score: 1

      I'm firmly in the static typing camp. Not only does it make things more reliable (due to compilers catching errors)

      There's a lot more in the way of errors that can be caught statically with very little extra effort - you just have to use a different tool (one specifically designed for the task) to check for errors statically instead of the compiler, and provide a few appropriate hints about your intentions (in a language that's very expressive for stating your intentions) as you write your code. For Java the tool is ESC/Java2, a very powerful static checker. It will catch all the errors a compiler will, plus a vast array of potential errors that mere compilation will never spot.

      If that sounds good, then it's worth pointing out that the extra annotations you need to add to explain your intentions can also be automatically converted into runtime assertions during the etsting phase, can be used to automatically generate JUnit unit testing frameworks, and can be automatically included into your Javadoc documentation. For the small cost of adding a few extra annotations - things you would be documenting elsewhere anyway - you get far better static checking, a powerful testing framework and harness for free, and it all goes into your documentation automatically.

      Check my sig, or head directly to the JML website to get an idea of what can be done.

      Jedidiah.

    23. Re:Dynamic typing by gnuLNX · · Score: 1

      Of course you do realize that vi IS the ultimate editor.

      --
      what?
    24. Re:Dynamic typing by masklinn · · Score: 1

      "somewhat static" typing as implemented in Java or C# (which is extremely different than complete static typing such as Haskell's or Ada's) doesn't catch that many errors actually, and the few it could catch are catched by unit tests.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    25. Re:Dynamic typing by toriver · · Score: 1

      What "dynamic typing" lets you do is postpone errors to runtime. How fun is that?

      I love writing Java code and catch errors at compile time. I hate using a reflection-oriented macro extension to Java where I need to wait until I try to run stuff before I discover any errors.

      If you want "dynamic type", write all your code using java.util.Map. Have fun.

    26. Re:Dynamic typing by helifex · · Score: 1

      A real good concreate example of the advantage can be see by comparing how much work it is to create an enumerable class in ruby vs c#

    27. 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).

    28. Re:Dynamic typing by masklinn · · Score: 1

      Please, don't mix dynamic typing with loose/weak typing.

      Smalltalk, Ruby or Python are dynamically strongly typed languages, this means that their typing is as strong as Java's or C#'s if not stronger (you can't actually cast in Ruby or Python, you have to convert, for example) but that the type checking is completely done at runtime, while Java or C# (due to "somewhat static" typing) do some type checking at compile time and some at runtime.

      PHP or Javascript, on the other hand, are weakly dynamically typed languages, which means that very few typechecking is actually done and the language will do it's best (/worst) to coerce your values to a type compatible with the operation you try to apply to it.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    29. Re:Dynamic typing by masklinn · · Score: 1

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

      Sorry, no, it doesn't. Try to apply a string operation to an array object in Ruby and see the interpreter tell you where you can stick it if you don't believe me.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    30. Re:Dynamic typing by grassy_knoll · · Score: 1

      That's one of the most insightful comments regarding static vs. dynamic I've seen in a long time. Very well thought out.

    31. Re:Dynamic typing by Some+Random+Username · · Score: 1

      Quite nicely how? And I didn't say you should use a pure dynamically typed language, remember? I simply stated the obvious benefit: you can be more flexible with less code. Wether or not you want to make that trade off is up to you, but pretending dynamic typing has no benefits at all is just silly.

    32. Re:Dynamic typing by Anonymous Coward · · Score: 0

      That is BS, is that why they came up with hungarian notation and why VB programmers still need to use those notation? Real programmers need to know what type a variable is in order to work efficiently. If not why use hungarian notiation at all.

    33. Re:Dynamic typing by gbjbaanb · · Score: 1

      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)

      I almost agree with you - however these languages are used for projects that are a chaotic mess of code that could be considered throwaway. (ie most web development).

      The elite developers I know tend to use statically typed, lower level languages, and are happy with the structure it imposes.

    34. Re:Dynamic typing by costas · · Score: 1

      Speed of development. That's it; nothing more, nothing less. But, you have to keep in mind that most code out there is *client* code, i.e. code that calls other libraries, someone-else's-code, etc and never gets called itself (and if it does, it's mostly by code of the same author(s)). So, if you can develop client code much faster, and still use a more "robust" (really, another word for "strict") language/framework for your platform code you have the best of both worlds.

    35. 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."

    36. 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.

    37. Re:Dynamic typing by Rick+BigNail · · Score: 1

      Perhaps you are overstating the cost of static typing.

      One need to do some design before writing a program. Beyond certain program size, design types does not add significant cost.

      As I am a conservative I'll rather have static typing than not.

    38. Re:Dynamic typing by jgrahn · · Score: 1
      [someone's attempt to explain dynamic typing]

      C++ has been handling this quite nicely for years. C# and Java to some extent now as well. So by going to a pure dynamically typed language what do I gain again?

      It was a bad example, and I don't really see what C++ feature you are talking about. If you mean templates, they are, in some sense, a dynamically typed language (for which the runtime errors happen during the second, traditional compilation stage).

      The grandparent's example was not a good one, but I cannot come up with a better right now.

      I like both kinds of type systems. If you think you don't need dynamic typing, you're either working on software where it's unsuitable, or you're missing out on something.

    39. Re:Dynamic typing by Anonymous Coward · · Score: 0

      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.

      It's not that you don't have type checking. It's just that rather than having the compiler do it for you and spit out "Hey idiot, you can't assign an int to a date". You have to do it at design time while you're writing the code.

      I've done BASIC programming back in the 80s, and there is a ton of stuff out there written in ASP which had no type-checking. The evidence of stuff working does not mean it's a great idea. I guess I'm actually somewhat baffled that what we did in BASIC is not back in vogue.

      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. Man it'd be so much easier if they'd just agreed to use a number, my searches would be faster, etc. But no, I've got to jump through some extra hoops to deal with the possibility of an alphanumeric being in that field.

      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.

    40. 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.

    41. Re:Dynamic typing by Anonymous Coward · · Score: 0

      A lot of the pain with static typing that people find in Java and C++ is because they don't use generic programming techniques. Sure, having to declare int x or string y constantly is a pain, but the fact is that a lot of functions don't NEED to know the type they are operating on. Strongly typed, but not explicitly typed like ML for example. In C++ (and now Java or so I hear) you can handle a type generically.

      template<typename T>
      T max(T first, T second)
      {
            if (second < first)
                    return first;
            else
                    return second;
      }

      This is a simple example obviously, but most of the work I do in C++ these days I don't declare a lot of explicit types.

    42. 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.)

    43. Re:Dynamic typing by hotpotato · · Score: 1
      I recently had to maintain a 200-line Python script I didn't write. More specifically, I had to wrap a couple of the classes defined therein in Java so they could be called from Java code.

      I'll admit that I'm not an experienced Python programmer. Far from it. I read the tutorial and I wrote a couple of small programs, but that's it. Nonetheless, I don't think the conclusions I drew from this experience would've been any different otherwise.

      I first tried to understand what accessible members these classes had. This was really difficult since the members aren't listed anywhere -- they're just dynamically brought in out of thin air. As there was no central place where they were all declared, I had to go over the entire class and pick them out..

      The next problem was understanding what the members meant. Of course I had to know their type in order to wrap them in Java, but even if I needed to access them from another Python script I still would've needed to know what sort of objects they referred to. And of course there's no easy way of figuring this out either.. I had to rely on the scarce documentation and on variable names.

      So my conclusion is that, while dynamic languages can boost productivity (I'm an avid Perl fan), it's very easy to write code that is really difficult to get into and maintain. And you don't have to be a particularly bad code to write such code.

    44. 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
    45. Re:Dynamic typing by Arroc · · Score: 1

      I'm not sure why do you think I mix the two.
      My point is that dynamic typing typically gives more flexibility compared to static typing. In Python's case for instance, variables do not have the notion of type. A Python function does not specify in its signature the type of expected arguments, allowing an object of any type to be passed. In Java/C++ the type is explicit and a common practice is the use "Inversion of Control" to break the type dependencies and provide an appropriate level of implementation abstraction. While in Python's case such a dependency does not exist in the first place, there is also a lack of a "contract" on the function rendering concept such as refactoring impossible to implement. BTW, I have a similar problem with generic programming in C++, it is very difficult to trace the requirements on generic arguments, the Java version at least allows to define a superclass for the gereric argument. I like Python a lot, but I do not consider it a strongly typed language at all, and I do not find it appropriate for many tasks.

    46. 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

    47. Re:Dynamic typing by mythz · · Score: 1

      Even statically typed Java will let you compile and run this.

      String a = "foo";
      if (a == "foo")
      {
          System.out.println("This will not be run!");
      }

      At least in a dynamically typed language an example like this will run as expected.

    48. Re:Dynamic typing by masklinn · · Score: 1

      In Python's case for instance, variables do not have the notion of type.

      Duh? Python doesn't even have the notion of variable. Python has names, and python has object. A name is bound to an object, and an object can have multiple names bound to it. A name has no value and no attribute (it's merely a kind of pointer) therefore can't have a type, and an object has a type.

      You can explicitely do your typechecks if you consider that you need them (via type() or isinstance()), and some people have reimplemented attributes/return values typechecks via decorators if you feel lost without them.

      Now please do tell me, how is python weakly typed (as in "not a strongly typed language at all")? Because it's not statically and explicitely typed? Is that all?

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    49. Re:Dynamic typing by Anonymous Coward · · Score: 0

      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.

      That sounds like a problem with Java.

      In C#, which I work with, everything is an object. Class, object, whatever.

      This may be why I just don't get these arguments. I'm used to C# which got rid of a lot of the crufty problems Java had. Perhaps this is why I see no great mecca in Ruby or Python.

    50. Re:Dynamic typing by Brock+Lee · · Score: 1
      // 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.

      That's a red herring. Even statically typed languages have run-time errors. For example, in Java there is ClassCastException, IndexOutOfBoundsException, etc. How do you know your code won't generate any of those? Well, you test.

      Code that is accepted by the compiler is not necessarily correct code. The type checking done by the compiler for a statically typed language catches a subset of problems. Unit testing can catch a far larger set of problems.

      And many people who've used dynamic languages have found, counter to their own expectations, that type-related issues were not a significant source of problems.

      So while you may not know how to write code in a dynamically typed language, some of us do.

    51. Re:Dynamic typing by Coryoth · · Score: 1

      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.

      What gets me though, is that people will make these sorts of comments all the time, and yet when you suggest that it's quite easy to take the same idea just a little further it all of a sudden becomes completely unpalatable and "too much work". Never mind that that's the same argument the dynamic type people use against static types. Never mind that for the extra work of contracts or specifying a little more than just type signatures you can get static checking gains and improvements in maintainability on par with what you get from using static types over dynamic types.

      If you really believe that specifying static types really does help reduce bugs and improve maintainability (and it certainly can) then check out the options for doing a little better again.

      Jedidiah.

    52. Re:Dynamic typing by bnenning · · Score: 1

      String FUNCTION trimString(String a, Number b)

      if (a==null or b==null or b>=a.length()) {
      // oops, looks like there are lots of potential runtime errors even with static typing

      }

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
    53. Re:Dynamic typing by Coryoth · · Score: 1
      Or, if you're actually interested in documenting intentions, catching errors prior to runtime you could have

      String FUNCTION trimstring(String a, Number b)
      requires a not NULL and b < a.length
      ensures result.length == b
      //code goes here...
      RETURN result

      But then those extra two lines which go a long way toward

      1. Documenting exactly what the function is doing
      2. Allowing static checking to catch a much wider range of errors
      3. Providing assertion checking during testing to find exactly when the function is being misused
      4. Generally improving maintainability of the code

      are apparently the sort of thing static type fans see as far too much work (while apparently declaring types everywhere, which in practice has a lower "extra typing to benefit" ratio is fine).

      If static typing makes sense (and for a lot of projects they do) then contracts make sense. See my sig for a powerful contract and static checking system available for Java that an save you enourmous amounts of work.

      Jedidiah.
    54. Re:Dynamic typing by shutdown+-p+now · · Score: 1
      Problem is, languages like Java really do get static typing wrong. It's good to have it, but I shouldn't need to write the type for each and every local variable and private field that I declare - the compiler can be made smart enough to figure it out on its own and not bother me with that (aka type inference). Public class interface, of course, has to be defined explicitly to prevent subtle changes creeping in. For a good example of a language that works like that, have a look at Nemerle. In it you can, for example, write:
      def list = List();
      list.Add(123);
      where in C#, you'd have to do:
      List<int> list = new List<int>();
      list.Add(123);
      Nemerle compiler is smart enough to deduce the specific version of generic class List from the way I use the object. I still get all the benefits of static typing, but none of the hassle of actually having to spell all the type names in full.
    55. Re:Dynamic typing by synthespian · · Score: 1

      This article uses wrong terminology.
      Static typing is not the same as strong typing. Dynamic typing is type-checking at run-time. Static typing is typing at compile-time. Common Lisp is dynamically strongly typed.
      Or take SML, for instance. You don't have necessarily to "declare" types, yet it's strongly typed:

      Standard ML of New Jersey v110.55
      - 12 + 5;
      val it = 17 : int ( int

      Hey! :-) SML just told me it knows the function takes an integer an gives an integer!

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    56. Re:Dynamic typing by synthespian · · Score: 1

      Sorry, the example was:


      - fun fact 0 = 1
      = | fact n = n * fact (n-1);
      val fact = fn : int -> int

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    57. Re:Dynamic typing by arevos · · Score: 1
      That sounds like a problem with Java.

      It's a problem with all statically typed languages. In a statically typed OO language, there's a limit to how object-like classes can be. An object can have it's values altered at runtime, but you cannot alter the values of a class, because that would invalidate type safety. Thus, there is a limit to how complete the object model can be in a statically typed language.

      A dynamically typed language, such as Ruby or Python, has no such restriction. Just as you can create new objects at runtime, so too can you create new classes. This leads into the territory of metaclasses and dynamic class factories, which is beyond the scope of languages like Java or C#.

    58. Re:Dynamic typing by toomim · · Score: 1

      There's no need for you to check the type and throw an error with dynamic typing. It will happen automatically for you when you call the function to reference the string `a' at index `b', and throw a "type error" if the arguments aren't a string and an integer.

      You're basically using a statically-typed style to write code in a dynamically-typed language. The whole point of dynamic typing is to let you not worry about specifying type issues in the language!

    59. Re:Dynamic typing by AndyS · · Score: 1

      "A dynamically typed language, such as Ruby or Python, has no such restriction. Just as you can create new objects at runtime, so too can you create new classes. This leads into the territory of metaclasses and dynamic class factories, which is beyond the scope of languages like Java or C#."

      ???

      I accept you can't add a new method to String.class, but you can define new classes at runtime. Java has a bunch of add-on packages for it, and .NET has it as part of the built in stuff to my knowledge (Reflection.Emit).

      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. Also, reflection tends to work by generating new classes at runtime. Slap -verbose:gc onto your java command line at some point and see which classes are flushed.

    60. 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.
    61. 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.
    62. Re:Dynamic typing by Eivind+Eklund · · Score: 1
      I'm trying to find out the contexts where static typing actually save work. What areas/contexts have you worked in, and how much have you programmed in (what) dynamic languages?

      I personally used to believe static typing caught bugs, until I started adding type checks to Ruby. This wasn't static typing, just type declarations that were checked dynamically, yet they were intergrated and I found the hits against them with my testsuite, giving about the same speed of check as running a compiler. I found that while I was developing, I was always hitting against them with things that were inappropriate. They did not catch any bugs for me - they just had to be changed all the time for non-bugs.

      On the other hand, there are clearly cases where types are necessary. They're crucially necessary at the "edges" of programs, for instance. You cannot talk to hardware without, in the end, breaking it down to particular bits hitting particular memory areas. And when you're talking to other computers, you also need to send a particular set of bits over - untyped data just can't do the job.

      I suspect there may a documentation benefit for the edge (interface) of modules when working with several people; I've just not seen much of it yet.

      For the future, I'm fairly sure there could be a much more floating line between 'static' and 'dynamic' typing, using higher level invariants, optional declarations, and various types of concrete type inference. However, before we can find the sweet spot for that, I think we need to know where we're getting our benefits...

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
    63. Re:Dynamic typing by Eivind+Eklund · · Score: 1
      The "makes things more reliable" assumes that it's the same amount of work to develop in a language with type declarations as it is to develop in a dynamically typed language.

      If it's less work to develop without type declarations - and my experience is that it usually is - then the increased development velocity gives more time for writing tests. This make things more reliable in the dynamic languages (well, really in my experience in Ruby - Perl has so many evil traps...)

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
    64. Re:Dynamic typing by Eivind+Eklund · · Score: 1
      I've written a draft on a paper on adding "more typing" to Ruby. By "more typing", I actually mean every way I've been able to find of changing typing handling for the better: Invariant checks, concrete type inference, type declarations, interfaces, etc. The paper goes through the benefits and drawbacks of each possibility in "more typing", as a survey paper with background. As a result, there's also one new system (or at least something I've not seen anywhere else).

      Would you be interested in doing a review? You can reach me at eeklund at gmail.com.

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
    65. Re:Dynamic typing by bensch128 · · Score: 0

      I think a good way to deal with this in a dynamically typed language is to use DBC
      require to ensure the parameter types are correct. This will make the typing check simple WHERE IT IS NEEDED.

      Cheers,
      Ben

    66. Re:Dynamic typing by Anonymous Coward · · Score: 0

      I've been working (professionally) in Smalltalk for half a year now, and in my spare time I'm coding something in Java. To me it is very obvious that dynamic typing has a lot of benefits (I prefer ruby and smalltalk and other dynamic languages over java actually, but I thought messing around in java a little would be fun). I'm not even so very sure of the fundamental advantage of static typing you bring up.

      Dynamic typing makes development easier. Believe me. Casting every Object from a Collection to some class is a bitch (aCollection do: [:item | item someMethod]) is really much easier than that. Also keeping in mind that you should factor out stuff from some classes in an interface so at some point that interface can be the type you cast to so you can call some method is not nearly as easy as just implementing the method on all involved classes, calling the method, and let method lookup do the work for you. In my 6 months at work in Smalltalk (which should be the 'next' Java, but should also have been the previous and the current one imho), I have not once seen an unexpected 'doesNotUnderstand' call (which is a result of the bug you're describing).

      Even better (or worse if you think it's ugly), we don't implement getters and setters here... if we send a getter method to an object doesNotUnderstand is called cause the method doesn't exist, and doesNotUnderstand will check whether the methodname equals the name of an instance variable, if so it just returns this, otherwise it sends a super doesNotUnderstand. This rids us of a lot of work, and I don't really see good alternatives in a statically typed language where you can't send methods to 'types' that don't implement those methods.

      Concerning the advantage you state for statically typed languages... indeed, you get errors at compile time and not at run-time... unless you accidentally cast a wrong object to some type. it compiles just fine, until at run-time when it throws a ClassCastException in your face. Pretty neat. All the compile-time checking and what does it do? _exactly_ the same as any dynamically typed language does.

      Joy to that.

    67. Re:Dynamic typing by CastrTroy · · Score: 1

      Class cast exception can be avoided by not trying to cast objects to types that they shouldn't be cast to. Of course you can't cast an ArrayList to a BufferedStreamReader. In the same way, you should always check that you aren't going outside the bounds of your array. The compiler can't catch an error when you're using an int to reference the array index, and your array only has 5 elements. It would be impossible for the compiler to tell what your integer would be at run time.

      The number of unit tests you have to write increases with dynamic typing. You have to write unit tests to see what happens when you pass in the wrong type. With static typing, you can ignore those tests, because your code won't compile, and spend more time writing other tests.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    68. Re:Dynamic typing by Brock+Lee · · Score: 1

      Class cast exception can be avoided by not trying to cast objects to types that they shouldn't be cast to. Of course you can't cast an ArrayList to a BufferedStreamReader.

      That's correct. But then a function/method having to check for possible parameter errors can be avoided by not passing in incorrect parameters.

      The number of unit tests you have to write increases with dynamic typing. You have to write unit tests to see what happens when you pass in the wrong type.

      That's incorrect. You do not have to write unit tests to see what would happen when passing in parameters of the wrong type. You have to write test to make sure the callers pass in parameters of the correct type.

    69. Re:Dynamic typing by CastrTroy · · Score: 1

      So, instead of letting the language do the work of ensuring that parameters of the right type are being passed, you have to write your own tests? That sounds kind of like a waste of time. Maybe we should make a language where you have to write your own tests to make sure the syntax is correct, instead of the compiler doing it for you.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    70. Re:Dynamic typing by ratboy666 · · Score: 1

      And why not? Ok. maybe its Ruby, and the classes aren't defined that way...

      But, why isn't a "string" simply an "array of characters"?

      Ratboy.

      --
      Just another "Cubible(sic) Joe" 2 17 3061
    71. Re:Dynamic typing by ratboy666 · · Score: 1

      Maybe Java needs to take a page out of Smalltalks book. Smalltalk really has very few errors: "DoesNotUnderstand" would be the catchall. But the "debugger" is tied right in, and you get an immediate traceback. The compiler is tied to the browser, and development is very interactive.

      Ratboy.

      --
      Just another "Cubible(sic) Joe" 2 17 3061
    72. Re:Dynamic typing by ratboy666 · · Score: 1

      This is interesting, because you are using "anti-OOP" thinking here. What you are doing is "foo" -- in other words, you are NOT thinking about WHAT you are doing, but are thinking (in great detail), about the thing you are doing it to. onst ReallyComplexDataStructure& arg1, or "const char *"

      Stop it.

      If you can define a sensible operation, that operation should apply to as many compliant "types" as possible. It was hard to get it right the first time, no? So why invent it again? The idea is to have behavioural pre-conditions. For example: something that can be sorted MUST BE ORDERABLE. If *that* holds true, then this is how to sort. In turn: For something to be orderable it must support the LESS THAN and the EQUAL TO relation.

      I am not interested in the TYPE (in the sense of "integer" vs. "float" vs. "character"). I AM interested in what holds true and what can be done.

      Ratboy.

      --
      Just another "Cubible(sic) Joe" 2 17 3061
    73. Re:Dynamic typing by GileadGreene · · Score: 1

      You might try mentioning your draft over at Lambda the Ultimate. They're very interested in programming language design over there, including things like type systems. A few stories on Ruby have popped up recently, and I'm sure they'll be interested in the work you're doing.

    74. Re:Dynamic typing by masklinn · · Score: 1

      Because we're not coding in fucking C, thanks nonetheless for the suggestion.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    75. Re:Dynamic typing by Arroc · · Score: 1

      In this interview, the interviewer frames the exact same issue I am talking about. Python is repetedly described as a "weakly typed system", the issue of contracts in methods is exposed, and Guido accepts the argument. But of course he might not know what he's talking about.

    76. Re:Dynamic typing by Anonymous Coward · · Score: 0
      This has nothing to do with static or dynamic typing, and the println will be executed on all JVMs that automatically intern string literals.

      Sun JVMs for a while at least do automatically intern all string literals, so your program would output "This will not be run!". Also, why would you expect that == would return true in the general case (apart from strings)? What you are trying to accomplish is "foo".equals("foo"), which is true on any JVM.

    77. Re:Dynamic typing by masklinn · · Score: 1

      The only argument I see Guido accepting here is that methods don't have type contracts (and, implicitely, that Python is not statically typed, which it obviously isn't).

      The issue then is defining what "weakly typed" means. From what you say it seems that you equate dynamic typing with weak typing. Fine by me, I don't, end of the discussion, it won't lead anywhere since we don't agree on the basic definitions of the terms we both use.

      Have a nice day.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    78. Re:Dynamic typing by Eivind+Eklund · · Score: 1
      That's probably a good idea; I'd not thought of it. So far, I've only showed it to individuals because I've been thinking of getting it academically published; I'll think a bit more on it (specifically, check how much work it would be to publish it) and then probably send it to LtU.

      Thanks!

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
    79. Re:Dynamic typing by Anonymous Coward · · Score: 0

      It's a problem with all statically typed languages. In a statically typed OO language, there's a limit to how object-like classes can be. An object can have it's values altered at runtime, but you cannot alter the values of a class, because that would invalidate type safety. Thus, there is a limit to how complete the object model can be in a statically typed language.

      If I created a class with a private attribute, in Ruby or Python, can I add a method in runtime to fetch that value? If I understood you correctly, you're speaking of altering classes in runtime.

      If so, doesn't it break the "encapsulation" from OO?

    80. Re:Dynamic typing by arevos · · Score: 1
      If I created a class with a private attribute, in Ruby or Python, can I add a method in runtime to fetch that value? If I understood you correctly, you're speaking of altering classes in runtime.
      Python doesn't have private elements, but yes, you can quite easily add a method to a class or object at runtime:
      class SomeClass:
          value = "Hello world"
       
      def foobar(self):
          print self.value
       
      SomeClass.foobar = foobar
       
      a = SomeClass()
      a.foobar()
      Ruby does have private methods, but it too can add methods to classes at runtime:
      class SomeClass
          @@value = "Hello world"
      end
       
      class SomeClass
          def foobar
              puts @@value
          end
      end
       
      a = SomeClass.new
      a.foobar
      Ruby and Python have slightly different attitudes to classes, but the end result is the same.
      If so, doesn't it break the "encapsulation" from OO?
      Both Ruby and Python take the approach that if the user really wants to do something, then they should allow him or her to do it. So yes, thinking about it, you're correct in asserting that there's no strict enforcement of OO encapsulation.

      But this is an unavoidable tradeoff. If classes are objects, and objects can be altered at runtime, then there isn't a way to enforce encapsulation without drawing a line between class and object, as both Java and C# do. Which method is best is up to the programmer.
  8. new language is..... by Anonymous Coward · · Score: 0

    Fortran '08 baby!!

  9. The D Programming Language by WalterBright · · Score: 1

    Check out the D programming language, http://www.digitalmars.com/d/, which is a refactoring of C++ to keep the performance benefits but make it much easier to program in.

    1. Re:The D Programming Language by Anonymous Coward · · Score: 0

      From the quoted website:

      "D was conceived in December 1999 by Walter Bright as a reengineering of C and C++, and has grown and evolved with helpful suggestions and critiques by friends and colleagues."

      Is that you Walter?

    2. Re:The D Programming Language by Anonymous Coward · · Score: 0

      "Those who do not understand C++ are condemned to reinvent it, poorly."

    3. Re:The D Programming Language by Anonymous Coward · · Score: 0
      Is that you Walter?
      "The D Programming Language
      (Score:1)
      by WalterBright (772667)"
      Guess :-)
    4. Re:The D Programming Language by gnuLNX · · Score: 1

      I have recently started looking at D and I have been quite impressed. Not sure I can justify giving up C++....just yet.

      Actaully since you at least have the same name as the creator can you tell me how easy it would be to extend and ebmedd Python with D? Or any other high level languge for that matter?

      --
      what?
    5. Re:The D Programming Language by Anonymous Coward · · Score: 0

      Those who understand C++ dont use it

    6. Re:The D Programming Language by WalterBright · · Score: 1
      Actaully since you at least have the same name as the creator can you tell me how easy it would be to extend and ebmedd Python with D? Or any other high level languge for that matter?

      The D programming language supports the C ABI (Application Binary Interface) which means that any language that supports the C ABI can interact with D.

    7. Re:The D Programming Language by juanjoc · · Score: 1

      I have been using D for a few weeks now, and I am amazed at how productive and fun it is to use compared to C++. It has the flexibility of C#/Java and the performance of C/C++.

      I've been working in C/C++ for more than 10 years now, and the language's been getting so complex and it's libraries so full of template hacks, that it's no longer fun to work with.

      Java, on the other side, has a cleaner syntax, but it's memory footprint and general bloat make it impossible to use in any place except big server applications. Even the best results when writing GUI applications (those that use SWT) are not responsive enough compared to those written in C/C++.

      There are very interesting D projects at dsource.org, including Mango, DDL, DWT, Build and others.

      You should evaluate the language and judge it on its technical merits. If you're a C++ programmer looking for greener pastures, I'm sure you'll fall in love with the language immediately.

  10. What does "half-ass" mean? by Anonymous Coward · · Score: 0

    What does "half-ass" mean? Jumping on the latest language bandwagon? Learning every "language" out there?
    I can see it if you mean "use the appropirate tool for the job", but...

    If all your job boils down to is learning a new language, then you are in more trouble than you think.

  11. Ruby by Douglas+Simmons · · Score: 1

    I see this book touches on Ruby a handful of times, but for a beginner who knows a dash of html and php, could someone recommend a Ruby on Rails book for total beginners? ... or should I stick with php :)

    1. Re:Ruby by ukpyr · · Score: 1

      check out all the tutorials first. You can learn at least 70% of the ruby on rails system just going through them.

      O'Reilly has a bunch. Basiclly they are all over.

    2. Re:Ruby by Scarblac · · Score: 1

      Agile Web Development with Rails is very good, and cheap.

      --
      I believe posters are recognized by their sig. So I made one.
    3. Re:Ruby by mythz · · Score: 1

      If your using php, you might as well use python. Apart from being a cleaner more powerful language, its quicker to boot. And if the world chooses between CLR/JVM you have a good chance in being able to port your code with either Jython or Iron Python, which is sure to have some strong corporate backing and good IDE integration.

  12. C# by blaster151 · · Score: 1, Interesting

    I find C# to be far and away the most productive and efficient language I've ever worked with. This is, of course, due in large part to the robustness of the .NET class framework and the top-notch development environment. To me, it was a significant step up from Java (although I understand that that's a subjective statement). As someone who has been working professionally with C# for years, and who has found it to be a much faster way to deliver quality production code, I contend that C# is the true benchmark: Java has already been superceded.

    1. Re:C# by Anonymous Coward · · Score: 0

      Considering that C# was designed to be a direct wintendo-only clone of Java, your statements are laughable at best.

    2. Re:C# by Anonymous Coward · · Score: 1, Interesting

      >> To me, it was a significant step up from Java

      How so? Most of the useful C# bells and whistles were added to java 1.5.
      The syntax is almost identical, yet it is lacking in OS independence.

      I know mono is coming along, but its not nearly as polished as say, Sun's 1.5 implementation on linux.

      There are also free(beer & speech) implemenations like jamvm, kaffe, and gcj along with the gnuclasspath API that are progressing nicely.

    3. Re:C# by PCM2 · · Score: 1

      Laughable? How so?

      By all accounts, C# is a good language. The worst things anyone has ever said about it are (1) that giving you the "easy out" of unsafe code is going to encourage bad coding practices; and (2) that it's derivative of Java. Well guess what? Java wasn't designed in a vacuum either, and it was designed by a single company just like C# was. We just tend to like Sun better than Microsoft. (Or do we? I lose track from time to time.)

      The OP said that he is efficient in C# because of the .Net class library and the development environment, by which I assume he means Visual Studio. Both are things that, if you're an anti-Windows bigot and you never code on that platform, you probably don't have anything meaningful to say about.

      I talk to a lot of developers, though, and in my experience even people who aren't pro-Windows bigots, if they're open minded, will say that Visual Studio is one of the best development environments around, if not the best. Sure, if all you want to do is program in Java, then Visual Studio won't help you much. But all that means is that you've made up your mind without trying out your options, so you don't really have anything to contribute to a discussion about the relative merits of developer tools.

      --
      Breakfast served all day!
    4. Re:C# by Anonymous Coward · · Score: 0

      I guess you missed the part where the OP said that C# is a step up from java.
      Calling something better than something else with out any type of argument is typically considered a flame. Especially for geeks in the context of operating systems, programming languages and text editors.

    5. Re:C# by PCM2 · · Score: 1
      I guess you missed the part where the OP said that C# is a step up from java.
      No he didn't. He said that to him it had been a significant step up from Java.

      If your own personal experience isn't a valid basis for forming your own opinion, then what is? Slashdot consensus?

      --
      Breakfast served all day!
    6. Re:C# by DdJ · · Score: 1
      By all accounts, C# is a good language. The worst things anyone has ever said about it are (1) that giving you the "easy out" of unsafe code is going to encourage bad coding practices; and (2) that it's derivative of Java.
      First, I want to say that I agree that from what I've seen, C# appears to be a good language. But I think you're being unfair when you say those are the worst things anyone has ever said about it.

      For me, the worst feature of C# is that it's so tied to Microsoft platforms. Yes, you can use mono in theory. Yes, there are appservers that let you get a CLR running on Linux boxes. Realistically, those are closer to edge cases than to common reality.

      How many mobile phones ship with JVMs? How many ship with .Net CLRs? How many PDAs can get JVMs? How many PDAs can get .Net CLRs? For Windows, how many competing industrial strength C# app servers are there? Now, how about for Linux? For Solaris? For HP-UX?

      Yes, you can use mono in theory, but you've got to realize that this is not the same sort of thing as choosing between Sun's, IBM's, and BEA's Java app servers. In reality, C# is tied to Microsoft platforms to an extremely high degree when contrasted with other languages. For me, this is the worst thing about it by far. It's a pretty bad thing!

      But once again, if Java disappeared off the face of the planet tomorrow, I would probably become a C# developer. Though I will give Ruby on Rails a look. (Python is right out -- I am unwilling to consider it.)
    7. Re:C# by mythz · · Score: 1

      >How so? Most of the useful C# bells and whistles were added to java 1.5.

      Some other useful 'bells and whistles' they must've missed in Java 1.5 include:
      - properties and indexers
      - Operator loading
      - Strings as first class citizens (you can actually use string inside if/switch statements). Not an advanced feature i know - but still lacking in Java.
      - events/delegates
      - partial classes
      - anonymous methods

      on the horizon C# 3.0 include
      - type inferencing
      - lamda functions

      Just some features in a language designed to be 'developer friendly'.

      >I know mono is coming along, but its not nearly as polished as say, Sun's 1.5 implementation on linux.

      Just another slashdot fact-filled comment from someone in the know.

    8. Re:C# by PCM2 · · Score: 1
      Yes, you can use mono in theory.
      Actually, you can use Mono in practice. It's my understanding that, from now on, both Red Hat and Suse (and probably some other distros) will be shipping with software written in C# that runs on Mono installed by default -- for instance, the Beagle desktop search facility.

      Can you reliably code everything using Mono that you could code in Java? No. But it is usable.

      That said, I just forgot about the whole Windows-only thing because I was thinking in the abstract, i.e. "ability to get a task done," not "ability to get a task done using Linux."

      --
      Breakfast served all day!
    9. Re:C# by Stu+Charlton · · Score: 1

      As someone who has been working professionally with C# for years, and who has found it to be a much faster way to deliver quality production code, I contend that C# is the true benchmark: Java has already been superceded.

      C# is a good language, and for many types of rich Windows applications I agree it is more productive approach than Java + Swing; the event and delegate model is very intuitive.

      Having said that, Java is also very productive; a lot of the problems have been the era in which older applications were written. People didn't know a lot, and abused the language. leading to monstrosities.

          ASP.NET is also a very productive approach to web sites, but it isn't really significantly productive than Java + Struts, or JSF.

      I've seen a few .NET monstrosities already; the platform is so new (only 4 years since the 1.0 GA) that they haven't really trickled out to the public to the extent that Java failure have after over 10 years of use.

      --
      -Stu
    10. Re:C# by DdJ · · Score: 1

      Having mono alone doesn't mean much, just like having a JVM alone doesn't mean much for java. This is exactly what I meant by "in theory". I don't think you'd find many enterprise .Net developers with practical experience who'd consider it a realistic option, for precisely the same sorts of reasons that most Java developers can't consider things like Kaffe a realistic option.

      Also, I was speaking in the abstract as well -- I do not use Linux, so what Red Hat and SUSE do is not of much use to me. I also don't use Windows.

  13. 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?

    1. Re:Ruby on Rails by VJ42 · · Score: 1

      Do people really think that way?

      Unfortunately yes they do. For people looking at your app (not developers) it's all about style not substance. So if your cometitor has a flashy AJAX interface, and claims that his system is designed in\by He'll do better tthan you, even if your product is just as good.

      --
      If I have nothing to hide, you have no reason to search me
  14. 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. :)

    2. Re:Rails by sulam · · Score: 1

      Wewps, apparently I forgot to hit plaintext format...

    3. Re:Rails by Billly+Gates · · Score: 1

      It seems Sun is coming out with java Server Faces as an asnwer to rad and php. Have any of you guys tried it?

      I am surprised it has no mention here on slashdot so far but most new young slashdot geeks are not interested in java. What a difference a decade makes?

    4. Re:Rails by jkauzlar · · Score: 1

      JSF seems to do some interesting things, particularly with form processing, but I haven't looked at it much further. It hasn't caught on in any large scale. A lot people are touting its strengths as a complementary technology alongside Struts to manage the 'view' aspects, whereas Struts tends toward clean separation of the 'view' from model and controller aspects.

    5. Re:Rails by Anonymous Coward · · Score: 0

      Well, Bruce Tate isn't just a guy that writes books: he's a guy that's written really useful Java books. He's also written real software, used in real production systems.

      I honestly wrote less ruby code than I wrote config files with JSTL, Spring and Hibernate for an equivalent project. And I get to keep all the MVC goodies I was used to. After a while playing with Ruby, I've also realized that the languages are not equivalent: Ruby is far more powerful.

    6. Re:Rails by sulam · · Score: 1

      (Let's see if I remember to hit the plaintext format pulldown this time...)

      JSF is not what I would consider a RAD framework for the web. If you use the right development tools, I suppose it could be, in that the 'right' JSF development tool will generate a lot of configuration for you automatically. However, it will still leave you a fair amount to do in terms of writing controllers and data binding. I can _imagine_ a tool which could replicate what Rails does by making intelligent choices for all the libraries you need and auto-generate the code and configuration required to hook it all together. But nothing like that tool exists. Some folks do seem to be trying to get there (Seam being one of them, sorry for the pun).

      That said, there are some folks trying to replicate what Rails does for Ruby, in Java. There's also AppFuse, which is a bit more of a Java-centric way to do RAD. Of course, Ruby is a more dynamic language than Java, so you end up doing a lot more code generation and a lot less configuration by convention. That's not necessarily a bad thing, just different.

    7. Re:Rails by Anonymous Coward · · Score: 0

      Have you tried using an IDE like Eclipse (with plugins of course) or NetBeans or IntelliJ?

      I'm tired of hearing this crap when right in front of me I see a complete solution that leaves me 4 clicks away from having a webservice deployed, up and running, drag'n drop support for Struts, JSF and JSTL tags AND automatically creation of XML files.

      All I have to do is save the file and there it is, deployed and running. No Ant scripts!

      Please stop using notepad (or eclipse without plugins, which is an improved notepad) and get a decent tool.

    8. Re:Rails by matfud · · Score: 1

      JSF is an attempt to produce a componentised development envoironment. You use it a bit like a widget library. It can theoretically render to anything although must come with a basic html implementation. We are currently using it with facelets (a light weight templating system).

      Its not bad but its component abstraction does not go far enough in my opinion. You still spend too much time fiddling with tags to make it work (its lousy at reporting any kind of meaning full errors. Facelets helps alot).

      A big problem we have is with the lack of namespaces in javascript. Myfaces and other third party ajaxified components bring in thier own JS and can cause hard to find locations.

      It works well for most stuff. Knocking up prototypes is very fast and easy.

  15. 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 what+about · · Score: 1

      I agree with you, if I can add an analogy to better explain the issue.

      To me static checking (that is consistency checks that are done at compile time) are like an Engineer designing a plane, he does it with tools that declare the wings and the parts of the plane sound, even before the tests that have to be done to confirm the project.

      We must also remembar that some stuff is not testable (big bridges, buildings) you HAVE to design it properly using tools that make it good from the design, before you deploy it !

      I am really against the "quick changes" or overriding default behaviour, it is fine for tiny projects, it is a recipy for disaster on someting that is a few pages long.

      There is a space for Ruby, togeter with perl, php, pyton, 'c', c++, smalltalk, cobol, basic, fortran, c#, etc. Somebody said that it is best to let big player to develop something and see how it goes.

      Myself, I would not make a book writer, that makes a few hyped statemets, rich by buying his book, better to spend the money on something better :-)

    3. Re:Ah. Dynamic typing. Again. by Jerf · · Score: 0, Flamebait

      than having to find all of my bugs (rather than 5% of them) through testing.

      HOLY FUCK. 95% of your bugs are typing bugs?!?!?

      What kind of incompetent programmer are you? Don't ever come to me looking for a job!

      My experience in dynamically-typed languages over the last few years is that 5% at most are typing bugs, and I'd guess much closer to 1%.

      Seriously, if the primary effect of using a dynamically typed language was to increase your bug rate by a factor of 20, don't you think we'd have, you know, noticed? Give us some credit. While you're at it, why not try it out for a few months, if that strawman argument is what is holding you back?

    4. Re:Ah. Dynamic typing. Again. by Coryoth · · Score: 1

      To me static checking (that is consistency checks that are done at compile time) are like an Engineer designing a plane, he does it with tools that declare the wings and the parts of the plane sound, even before the tests that have to be done to confirm the project.

      And I think something that static typing advocates who use this sort of argument need to realise is that static types are not the be all and end all of declarations you can make to ensure consistency with intended function. In theory the Curry-Howard isomorphism means that indeed types are propositions. In practice most type systems provide a very poor syntax for clearly stating your propositions. The best way to get around that in most languages is to provide extra syntax that allows expressive descriptions of your propositions, or, if you like, your assumptions. Yes, the type signature of a function declares certain properties that ensure a certain amount of consistency that can be checked statically. There is a lot more in the way of assumptions you can decalre that will ensure far more important consistency properties that can still be checked entirely statically.

      Check out JML and ESC/Java2 for Java to see how much extra static checking you can get above and beyond simple type checking. The same sorts of things for C are provided by Splint. If you're someone who prefers ML then take the time to check out EML which adds the ability to define and check axioms in Standard ML.

      Jedidiah.

    5. Re:Ah. Dynamic typing. Again. by Coryoth · · Score: 1

      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").

      If you interested in cutting out more bugs statically and not having to worry about corner cases in testing then I suggest you check out Extended ML and HasCASL which provide expressive language additions for more clearly defining intent and tools that can catch far more busg statically than even Haskell or ML's type systems can.

      Jedidiah.

    6. 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.

    7. Re:Ah. Dynamic typing. Again. by IamTheRealMike · · Score: 1

      One other thing people tend to overlook is that statically typed languages are a ton easier to optimise and compile than totally dynamic languages like Python/Ruby ... one of the reason these languages have quite poor performance characteristics is because they aren't very static.

    8. 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.

  16. 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!

    1. Re:Rails and unit tests by Anonymous Coward · · Score: 0

      For being "fairly readable code", I don't have the slightest idea what that code does.

      Although it appears like you're not doing a unit test, but rather some kind of input validation. Similar to the use of assert() in C.

    2. Re:Rails and unit tests by sammy+baby · · Score: 1

      A quick note: there is indeed a great testing model "baked right in," as the Rails folks like to say. But it's not just unit tests. The model also does functional testing as well.

      The rails framework follows the Model-View-Controller pattern. Tests on models are unit tests. Tests on controllers are functional tests. Both are part of the framework, which is a nice gesture.

  17. dying? by Anonymous Coward · · Score: 0

    So is C++, oh wait...
    well, maybe C? no...
    Fortran? damn...

      lots 'o corpses walking around here...

  18. 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: 1

      No, no, no, you don't understand. We NEED a single language which is all-encompassing, and is a perfect fit for EVERY situation. Jusst think of the training savings. Just think of the manpower savings. Just think of being able to move programmers around into every project without the need for the learning curve.

      .
      .
      .
      .

      Yes, I am NOT serious, but this is a mantra for every PHB and book writer. Look! I have The Global Solution(tm)

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    2. Re:News flash! by johnjaydk · · Score: 1
      We NEED a single language which is all-encompassing, and is a perfect fit for EVERY situation.

      DOD tried that with Ada. Didn't do them a lot of good...

      --
      TCAP-Abort
    3. Re:News flash! by CastrTroy · · Score: 1

      You are right though. You can do anything in any language. Why do we need so many? Really we should have 1 language, with different versions that are backwards compatible, adding new features along the way. We could have options for dynamic or static typing, as well as options for whether or not we would need object oriented code or just functions. We'd probably need a couple other languages for specific tasks, but there should be 1 language that can handle 95% of the development out there.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    4. Re:News flash! by RetroGeek · · Score: 1

      Sure, but you do know what an elephant is, don't you?

      A mouse designed with government specifications.

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    5. Re:News flash! by RetroGeek · · Score: 1

      but there should be 1 language that can handle 95% of the development out there

      Too many conflicting requirements. An analogy would be the wide variety of vehicles we have. A transport truck is not an Indy car, yet both move things from point a to point b.

      Different languages are also better at certain things. I would REALLY hate to have to build a Web application in assembler, yet writing device drivers in Ruby is just plain impossible.

      Languages (and language paradims) do have their strengths and weaknesses, and there are a LOT of different application requirements.

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    6. Re:News flash! by CastrTroy · · Score: 1

      Yes, that's why we'd need a couple different languages. But do we really need as many choices as we have?

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    7. Re:News flash! by evilpenguin · · Score: 1

      Hmm... I'd awlays heard that a platypus was a swan put together by a comittee...

    8. 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.
  19. Not true! by keester · · Score: 1
    That same example now requires deployment descriptors, packaging into WAR files, configuration files, etc, etc
    This is not true. Here's my 3 step guide to creating a hello world servlet with Tomcat: 1) Make directory $CATALINA_HOME/webapps/helloWorld 2) Make directory $CATALINA_HOME/webapps/helloWorld/WEB-INF 3) echo Hello World > $CATALINA_HOME/webapps/helloWorld/helloWorld.jsp Voila!
    --
    Take it easy? I'll take it anyway I can get it . . .
  20. 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 Dan+Farina · · Score: 1

      Let me know when the world comes to their senses and starts using Scheme instead, or some future or past dialect that has not a thousand page standard and a marginal packaging system.

      Plus call/cc is cool.

    3. Re:Lisp by fionbio · · Score: 1

      Let me know when the world comes to their senses and starts using Scheme instead, or some future or past dialect that has not a thousand page standard and a marginal packaging system.

      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. Different Schemes have different OO/package/whatever system, so porting between them is, well, something quite like complete rewrite. Concerning marginal packaging system -- would you please be more specific?

      Plus call/cc is cool.

      Agreed, but life is hard without unwind-protect (aka try ... finally). And it's possible to have continuations in CL when they are really necessary.

    4. Re:Lisp by masklinn · · Score: 1

      Different Schemes have different OO/package/whatever system, so porting between them is, well, something quite like complete rewrite.

      Sad thing is... you can say exactly the same for the various Common Lisp implementations.

      While there is an extensive (yet old) specification for the core language, the CLisp folks just didn't consider that standardizing a "standard library" would be a good idea, and as a result each and every implementation features it's very own implementation of threads, networking, GUI, ... completely incompatible with the implementation next door (and sometimes within an implementation from one platform to the other).

      And the worst, I think, is that the Lisp community doesn't seem to see how some kind of standard library (as in, including the batteries in Clisp) would be useful to bring people new to the language in, or keep them there.

      Then again, actually reading comp.lang.lisp (or -- god forbid -- asking a question there) is sadly more than enough to drive you very far from trying to code in lisp ever again.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    5. Re:Lisp by Spit · · Score: 1

      Whomever told you that lithp ith inaccethible ith obviouthly a thtupid ingnoramuth. Lithp ith the greateth thoftware language, with clear thructure and eathy maintenanthe.

      --
      POKE 36879,8
    6. 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.
    7. Re:Lisp by fionbio · · Score: 1

      While there is an extensive (yet old) specification for the core language, the CLisp folks just didn't consider that standardizing a 'standard library' would be a good idea, and as a result each and every implementation features it's very own implementation of threads, networking, GUI, ... completely incompatible with the implementation next door (and sometimes within an implementation from one platform to the other).

      [BTW: CLISP is just an implementation of Common Lisp, please don't confuse it with the language itself] Yes, this is a problem, but it isn't as bad as it may seem. Do we have standard threads/networking/GUI in C? C++? (POSIX doesn't count - a lot of C/C++ code is written for Win32) What about 'standard' threads/GUI in Perl? Yet these languages are quite widespread.

      And the worst, I think, is that the Lisp community doesn't seem to see how some kind of standard library (as in, including the batteries in Clisp) would be useful to bring people new to the language in, or keep them there.

      Not true. Look here.

      Then again, actually reading comp.lang.lisp (or -- god forbid -- asking a question there) is sadly more than enough to drive you very far from trying to code in lisp ever again.

      cll does indeed attract some number of strange trolls. Also, Lisp newbies in initial stages of their enlightenment do post some strange stuff sometimes. (When one begins to 'get it', things may seem much more cool than they are in reality for some time. It's important to learn the language a bit instead of inventing 'perpetuum mobiles' after learning a few nice features). But overall I was never insulted by anyone there though I did post some thoughts. And I don't think anyone will get flamed by cll old-timers unless he/she posts something implying that everyone else on the newsgroup is an idiot.

    8. Re:Lisp by masklinn · · Score: 1

      [BTW: CLISP is just an implementation of Common Lisp, please don't confuse it with the language itself]

      I was using CLisp as the shortcut to Common Lisp, much easier to type.

      Do we have standard threads/networking/GUI in C? C++? (POSIX doesn't count - a lot of C/C++ code is written for Win32)

      Well, there is POSIX and there is Win32. And then you can go query the OS api itself.

      And C and C++ are quite low level languages anyway, so people don't expect them to come bundled with anything. Common Lisp on the other hand is a very high level language, that doesn't really expose the OS api either, which means that you can't compare it to C/C++.

      What about 'standard' threads/GUI in Perl?

      Perl has the whole CPAN, which is what you could call an extended standard library, which is why the language itself doesn't need a huge standard library. Each and every Perl user knows about CPAN, and the first reflex of a Perl guy looking for a module or a functionality (unless he really wants to reimplement it himself) is to browse CPAN, so that's a non issue.

      Not true. Look here.

      Interresting, bookmarked.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    9. Re:Lisp by synthespian · · Score: 1

      Also, Lisp newbies in initial stages of their enlightenment do post some strange stuff sometimes.

      Hahaha, LOL! I entirely relate to that on a personal level. Lisp is a mind-fucker...Yes it is, you are never coming back from that trip! You go...WHOOOOAOOAAAAAAAT ?!

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    10. Re:Lisp by Dan+Farina · · Score: 1

      Unfortunately, I cannot relate; the beginning of my formal instruction was taught in Scheme, and I later learned to appreciate what I had when I later took an AI class using CL.

      Both were functional (in the usable sense) languages, but I have to say that I don't like the CL notion of throwing in the kitchen sink. A GOOD packaging system and standard way to write modules (Python got this right) would make me happier than some gigantic "core" functionality.

      PLT Scheme is getting this more right every day, but as you said, it had to go invent its own module and packaging systems. What lisp (any dialect thereof, or those yet unmade) needs a major player to develop, standardize, and support a relatively efficient implementation. (I know that CL is quite fast, but it lacks in the other areas)

      In my opinion, the those in the best position are at Sun and Microsoft. Both have significant developer drag and are showing increasing interest in having other languages run on the virtual machines. (Groovy on the former, IronPython and F# on the latter)

    11. Re:Lisp by hankhero · · Score: 1

      Need a good packaging system for Common-Lisp? Try asdf and asdf-install Just type (asdf-install:install 'cl-ppcre) and a fast regular expressions engine is downloaded to your computer, installed, compiled and ready. What more do you need?

  21. (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.
    1. Re:(ot-ish) Perl is not too loose and messy by tehshen · · Score: 1

      No I wouldn't, I'd do this:

      print foreach grep { -e $_ } @files;

      --
      Guy asked me for a quarter for a cup of coffee. So I bit him.
    2. Re:(ot-ish) Perl is not too loose and messy by jbolden · · Score: 1

      BTW Perl is my favorite language. Your line is a good example though of the problem. When people talk about maintainability what they mean is the ability of a programmer who is:

      1) Unfamiliar with the program
      2) Junior
      3) Does not have access to good information

      To quickly and easily change programs. Your line has a lot of interesting features

      1) You have an implicit variable for a function pointer
      2) You make use of the $_ pronoun
      3) You make heavy use of perl's order of execution i.e. the above could have been:
            my $funpointer = {-e $_};
            print (grep($funpointer, @files);
      4) To understand this you needed to know the special symbol "-" syntax for file tests
      5) finally an unusual keyword (grep) is used

      I think its pretty clear that you need to know Perl to understand someone elses Perl.

      And then there is the TMTOWTDI features. Assume there are lots of files so I wouldn't want to read the directory again and again and again. And just to make the example easy assume no tabs in the file names. Then you might use


      opendir(DIR,$path);
      my $dir = join ("\t",readdir(DIR))."\t";
      print grep {$dir =~ /$_\t/} @files;


      And this isn't even close to your versions. You can't memorize your way into understanding programs you have to actually read them....

    3. Re:(ot-ish) Perl is not too loose and messy by jbolden · · Score: 1

      sorry small bug should be


      opendir(DIR,$path);
      my $dir = "\t".join ("\t",readdir(DIR))."\t";
      print grep {$dir =~ /\t$_\t/} @files;

    4. Re:(ot-ish) Perl is not too loose and messy by bnenning · · Score: 1

      Sure, it looks like nonsense, but that's only if you don't understand Perl.

      That's the point. In Python I'd do:

      print [f for f in files if os.path.exists(f)]

      which is semantically equivalent and much more readable.

      People who think Perl is messy should take the time to learn it before slagging it off.

      I know Perl. I like Perl. But it is messy.

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
    5. Re:(ot-ish) Perl is not too loose and messy by Cow+Jones · · Score: 1
      No I wouldn't, I'd do this:

      print foreach grep { -e $_ } @files;

      Care to explain why? This does exactly the same thing, except with an unnecessary loop.

      --

      Ah, arrogance and stupidity, all in the same package. How efficient of you. -- Londo Mollari
    6. Re:(ot-ish) Perl is not too loose and messy by swimmar132 · · Score: 1

      Or the Ruby equivalent:
      files.each { |file| puts File.read(file) if File.exist?(file) }

    7. Re:(ot-ish) Perl is not too loose and messy by tehshen · · Score: 1

      The former allows you to do things like
      print "File: $_\n" ...
      instead of just print.

      --
      Guy asked me for a quarter for a cup of coffee. So I bit him.
    8. Re:(ot-ish) Perl is not too loose and messy by Anonymous Coward · · Score: 1, Interesting

      Personally I'd just write it like this:

      for (@files) {
            print "$_\n";
      }

      Possibly I might even declare a loop variable if there is any possibility of confusion. I like Perl, in fact it's one of my favorite languages, but I'm not into the golf thing...

    9. Re:(ot-ish) Perl is not too loose and messy by Eivind+Eklund · · Score: 1
      I've been pondering this for ten years. Perl is messy because it adds a bunch of useless special cases, uses obscure, context-ridden, hard to read syntax for a lot of operations, use special functions instead of having object methods, lack exceptions, have instanced and referenced hashes/arrays, give special varying treatment to function parameters depending on how the function is declared, lack proper type differences between numbers and strings, has an undef that only semi-works, and have make up hash references on its own (called autovivification.)

      There's some more evil in there, too, yet the above cover most of it. If you have a free choice, choose Ruby.

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
    10. Re:(ot-ish) Perl is not too loose and messy by Cow+Jones · · Score: 1
      True, but the point (probably) wasn't to just print the files but to find the ones that exist.

      The AC replying to your post obviously didn't get the point, but he's right that for anything more than printing file names, a loop (with indentation and all) would be more readable than a oneliner.

      --

      Ah, arrogance and stupidity, all in the same package. How efficient of you. -- Londo Mollari
    11. Re:(ot-ish) Perl is not too loose and messy by Anonymous Coward · · Score: 0

      English is messy too. Why u use it to write your sentence :)

    12. Re:(ot-ish) Perl is not too loose and messy by Anonymous Coward · · Score: 0

      But that prints a comma separated list of quoted filenames surrounded by
      "[" "]", as a result of doing a list reduction with a filter.  Why bother?
      Why not just do what the original pseudocode said, but in python syntax?:

        for file in files:
          if os.path.exists(file):
             print file

      Clear and concise and does what the GP wanted.  And anybody who has never heard
      of python can see what it does.

    13. Re:(ot-ish) Perl is not too loose and messy by Anonymous+Brave+Guy · · Score: 1
      When people talk about maintainability what they mean is the ability of a programmer who is:

      1) Unfamiliar with the program
      2) Junior
      3) Does not have access to good information

      To quickly and easily change programs.

      The thing is, there is no way to achieve that reliably in any language. Programming is, and fundamentally always will be, a skill. You cannot take someone unskilled, unexperienced and unassisted, and reasonably expect them to achieve the same results that a skilled and experienced colleague could.

      That said, the syntax of Perl in the grep example we're looking at is particularly unfortunate, as your list of "interesting features" demonstrates. It seems to me that the main difference between the original looping version and the Perl grep example is that the former is imperative in style and the latter is functional. If I'd written:

      print (filter exists) files

      in a fictitious-but-not-unrealistic programming language with native functional programming support, none of your "interesting features" is present, at least in the same form, yet the example remains pretty much the same in spirit. You'd still need to understand the basic concept of lists and filtering to understand it, but anyone at all familiar with functional programming could immediately grok it.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    14. Re:(ot-ish) Perl is not too loose and messy by jbolden · · Score: 1

      print (filter exists) files

      That's actually pretty close in Ruby for example "-e" is:
      File.exists?(TEST_FILE_1)

      The rest would then be fairly standard. Syntax wise at least Ruby would be easier.

  22. 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 Anonymous Coward · · Score: 0

      Actually I think in 5-10 years you'll have progressed into obsolescence and unemployment.

      I suggest some night classes outside of the tech field.

    2. Re:It's Too Much. by Cranky+Weasel · · Score: 1

      Actually I think in 5-10 years you'll have progressed into obsolescence and unemployment

      Nope. My company is footing the bill for 7 project management courses. Actually, they've already done so. The courses are done. I don't work for an IT company. I work for a solid, secure company that has an IT division. They keep their employees for decades, and retrain them if they want to move, laterally or vertically. The people in my position formerly are currently leading teams in unrelated areas.

      I'll be here pretty much until I retire.

    3. Re:It's Too Much. by Anonymous Coward · · Score: 0

      Man you really jinxed yourself now. I predict you'll be laid off before Q3.

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

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

  23. Those are the *primaries*? by feijai · · Score: 1
    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".
    Allow me to sum up the primaries: slow, slower, hillariously ad-hoc, and owned by Microsoft.

    If this is all we got, Java's going to be around for a long, long time.

    1. Re:Those are the *primaries*? by arevos · · Score: 1
      Allow me to sum up the primaries: slow, slower, hillariously ad-hoc, and owned by Microsoft.

      Python's generally faster than Ruby. And Groovy isn't really anymore ad-hoc than Ruby is, really.

    2. Re:Those are the *primaries*? by feijai · · Score: 1

      Um. After all this time, Groovy still doesn't even have a remotely complete formal specification. Groovy is a classic example of an ad-hoc language.

  24. 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.
    1. Re:Java's regexp support is yucky by DuckDodgers · · Score: 1

      I agree the Java syntax is more awkward. But if you use it often (and I do) you get just as familiar with it as the Perl syntax.

      I believe you can shortcut your Java code as:
      import java.util.regex.*;
      Matcher matcher = Pattern.compile("(?i)Email\\s*:\\s*([^\\s]*).*?Nam e\\s *:\\s*([^\\s]*)").matcher(text);
      // matcher.find(); // this may be required ???
      String email = matcher.group(1);
      String name = matcher.group(2);

      I'm pretty sure the (?i) directive makes the pattern case insensitive.

    2. Re:Java's regexp support is yucky by Waffle+Iron · · Score: 1
      I think that the main problem here isn't that RE's aren't built in to the syntax, but instead it's that Java sucks because it needs so much boilerplate to get anything done. For example, in Python it's also a 2-liner, but using a standard library instead of special syntax:

      m = re.match(r'Email\s*:\s*([^\s]*).*?Name\s*:\s*([^\s ]*)', re.I)
      email, name = m and m.groups() or ('nowhere', 'nobody')

      I actually like this better because it doesn't use a bunch of hidden magic values like Perl creates for each RE definition, and because I can hold on to the match object if I want and use its functionality in a straightforward way.

    3. Re:Java's regexp support is yucky by Anonymous Coward · · Score: 0

      There's no reason for the perl to be two lines.
      Like so:

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

    4. Re:Java's regexp support is yucky by mythz · · Score: 1

      Java's Regular expression library is just another classic example where Sun chooses not to follow their own naming conventions. The above code should've looked something like:

      Matcher matcher = emailAndName.getMatcher(text);
      String email = matcher.getGroup(1);
      String name = matcher.getGroup(2);

      The only thing worse than making up stoopid getter/setter conventions is not sticking to it.

      We can thank this classic API rot for the wonderful variety in determining the size of Java data types:

      String.length()
      [].length
      List.size()

    5. Re:Java's regexp support is yucky by Anonymous Coward · · Score: 0

      For example, in Python it's also a 2-liner, but using a standard library instead of special syntax

      And it all comes down to "hey, look at how few I use! Isn't it cool?". Software development is much more than that.

    6. Re:Java's regexp support is yucky by Waffle+Iron · · Score: 1
      And it all comes down to "hey, look at how few I use! Isn't it cool?" Software development is much more than that..

      Did I say that? No.

      But while we're on the subject, do you claim that Java's byzantine regex library is an example of a good API? Are you able to use it without having to refer to the documentation each and every time? There's more to software development than typing in and wading through the same redundant boilerplate code over and over again.

    7. Re:Java's regexp support is yucky by typidemon · · Score: 1

      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).



      So, in other words; you don't use regular expressions in Java very much? Do you need to look up how to use BufferedReader every time you need to write to a socket?

    8. Re:Java's regexp support is yucky by wurp · · Score: 1

      I actually don't use regular expressions in Java very much - I don't do very much screenscraping or arbitrary text file processing work in Java. However, snide comments aside, I think even you might agree that the perl syntax for regular expressions is a little more user friendly (assuming you know regular expression syntax) than Java.

    9. Re:Java's regexp support is yucky by LarsWestergren · · Score: 1

      "You had a problem, you thought you could solve it with regexp. Now you have two problems!"

      Why don't you just add a unique character between the name and email fields, and use String tokenizer? No need to mess around with regexp. A lot of problems people have with Java is that they are trying to use their old favourite tricks to solve problems that wouldn't even exist if they used the strengths of the language to create a better design.

      This would be true for all new languages though I guess.

      --

      Being bitter is drinking poison and hoping someone else will die

    10. Re:Java's regexp support is yucky by Anonymous+Brave+Guy · · Score: 1

      Blockquoth the AC:

      And it all comes down to "hey, look at how few I use! Isn't it cool?". Software development is much more than that.

      That's true, of course.

      Nevertheless, the lines-of-code test is a remarkably accurate measure of the expressive power of a programming language. Plenty of research has found that programmers generate roughly the same number of finished lines of code per day, regardless of language. Thus a much more more concise language will, in a measureable and objective sense, often result in more productive developers.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  25. 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.

  26. 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 Anonymous Coward · · Score: 0

      So long as you don't mind a language whose tokens include whitespace

    3. Re:Python by Anonymous Coward · · Score: 0

      It doesn't take pages of Java to print "Hello World."

    4. Re:Python by Malc · · Score: 1
      How is this pages of code?
      class HelloWorldApp {
          public static void main(String[] args) {
              System.out.println("Hello World!");
          }
      }
    5. Re:Python by Anonymous Coward · · Score: 0

      I love Python too. I think the answer to your question is simple (bear with me, I am only half-joking): it doesn't look like Bash or AWK or Sed or Perl. It looks like Basic. It doesn't let you do neat tricks like use anonymous code-blocks as objects like Ruby.

      Glyphs like $ or @ or even :: have no meaning in Python (yes, I hate decorators). How can you look like a true elite coder when you type mind-numbingly obvious things in Python that other people may understand, when you can show off true domain-specific-language-building skills by changing the behavior of the root Object in Ruby?

      Here's the secret: Ruby looks like Perl, Perl 6 is a mess, Java has hit a wall of sorts, and both of those communities have found something new and neat and interesting in Ruby on Rails. Good for them, RoR is not a bad framework, but it has limits and sooner or later people will hit those too: you can't hide the DB for too long and for crying out loud, you can't go around changing the root Object behavior because it fits with your idea of the world. Coders better than you or me have invented sub-classes for many, many reasons, and one of them is that you and me can agree on the common behavior of super-classes, foremost of which is the root-freaking-Object. When I go around looking for a 3/4" bolt, I want a 3/4" freaking plain-steel bolt, not some titanium-magnesium thing with an explosive core that can be remotely detonated from orbit.

      So, I am happy that the Perlers have found another obfuscateable language that uses diacritical symbols to change the meaning of things --what's the point of that when you have actual OOP and RTTI? or should I just go around inventing prefix glyphs for every freaking type I wanna use in my app, for my own convenience? oh wait, no I don't use Hungarian notation either, thanks. And I am happy that that the Javans can now declare functions without specifying every freaking exception that could be thrown their way from 1,000 lines of code upstream. Good for them. I'll be over here coding in a language that runs natively on both the JVM and the CLR and that other people (plus my sober self a few days later) can read easily, because good code, like a well-written book, a good movie or an entertaining rant on /. is about transmitting information to the reader, not making the author look like the top dog.

      But I guess people modify Civics for actual freaking street-races, so to each their own.

    6. Re:Python by masklinn · · Score: 1

      Python version:

      print "Hello World!"

      Ruby version:

      puts "Hello World!"
      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    7. Re:Python by Malc · · Score: 1
      MS-DOS:
      echo Hello World
      Doesn't even require quotes! What's your point? The Java version is hardly pages.

      There are more very simple examples, but it doesn't make any of them better than the others. Remember: always use the right tools for the job. In some situations Ruby and Python are completely inappropriate and Java is the right tool. In others it's the reverse.

      C++ in Windows (even better, uses the *native* GUI!):
      int main()
      {
          return ::AfxMessageBox("Hello World");
      }
      JavaScript:
      alert("Hello World")
    8. Re:Python by Ignominious · · Score: 1

      The point is a decent syntax and well chosen idioms should mean that a programmer can write an algorithm clearly and concisely - the hello world example is a little too trivial - if you compare non-trivial algorithms (e.g. sorting, etc) written in Java with other modern languages like ruby, python, D, the syntax is more elegant and readable in terms of understanding the code (assuming knowledge of each language).

      Obviously it's horses for courses but if it's harder to read and more tedious to write then programming becomes arduous.

    9. Re:Python by masklinn · · Score: 1

      What's your point?

      There was none, your example was trivial, worthless and stupid which gained it an as trivial, worthless and stupid answer.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    10. Re:Python by Anonymous Coward · · Score: 0

      Wow, you saved four lines, two of which consist only of }, and made it much slower and less reusable. Great job!

    11. 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++

    12. Re:Python by bill_mcgonigle · · Score: 1
      It's very human friendly, no need to learn/read/write hieroglyphs, like in Ruby or Perl.

      Sigils, or 'hieroglyphs' as you call them, can be very useful and improve programming speed.
      Jumping back and forth between java, perl, python, ruby, and php, I often bemoan when in java or python I have to go cross reference code just to see what type a variable is. What a waste of time.

      In contrast, Python is human un-friendly - it makes people indent code to a predefined standard, even if it's not how they like to work. And, after, all, what's more innate to human nature than the desire for freedom?

      In fact referring to them as hieroglyphs implies you don't know what they mean and haven't spent the three minutes required to educate yourself as to their purpose. After all, Egyptologists aren't afraid of hieroglyphs because they're not ignorant of their meanings.

      So, let's get down to brass tacks (perl example):
      • $variable is a scalar. That's a simple variable like a number or a string. $string = 'hello world';
      • @variable is an array. @array = (0,1,2,3,4,5);
      • %variable is a hash, or a keyed array. %hash = (a=>1, b=>2, c=>3);
      • Scalars require no element access.
      • Arrays use the [index] nomenclature, borrowed from C.
      • Hashes use the {key} nomenclature.
      • There's one quirk to perl 5 to keep in mind - scalar access to a complex data type is sigiled like a scalar. $array[5] or $hash{key}, for instance. Perl 4 and Perl 6 avoid this pedantic use of the sigil and support @array[5] and %hash{key} which is probably more 'human friendly'.


      So, there, you don't need to be afraid of sigils any longer. Which is good, because Python is getting sigils.

      Don't get me wrong - Python has some great uses. But being ignorant of other computer languages' designs is no excuse for dismissing their value. And rejecting one because it has features that add an extra dozen minutes to the learning curve is just silly.
      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    13. Re:Python by synthespian · · Score: 1
      Here's my take on Perl and its sigils: for all we know, sigils in Perl may make code more readable, not less. There's a whole lot lot of abstraction in:
      sub swap (*@_ is rw) { @_[0,1] = @_[1,0] };

      Until I read a scientific paper comparing two groups randomly assigned to Perl and to Python, I won't take a word of this "common sense knowledge" that Python is more readable.
      Consider Apocalypse 3: (...) If we're going that far in the direction of gobbledygook, perhaps there are prefix characters that wouldn't be so ambiguous. The colon and the dot also have a visual singular/plural value:
      @a .+ @b @a :/ @b

      Notice how Larry Wall anticipated visual clues. Where this stuff is coming from is not psychosis. More like hardwired quantitative concepts in your brain. Ever take an Standard Binet IQ test? Sort of like that place. For all you know, Perl might be lot like Chinese in reading. It does borrow some from iconographic language represenation.
      I remember reading once research on a semantographic language representation called Blissymbolics comparing language acquisition in such a system to a traditional alphabetical written system in normal college students, (might be somewhere here - I'm too tired to look it up thoroughly), and the results, IIRC, favored the iconographic language. Point being that there are more to these things than meets the eye.
      Python reads like a grocery list (boring!). Slashdot won't even let me post Zope code here, because it activates the Lameness filter! LOL. No kidding!
      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    14. Re:Python by bill_mcgonigle · · Score: 1

      @a .+ @b @a :/ @b

      OK, I admit I have no idea what that represents. But I'm not afraid to go find out. I was afraid of regex syntax for a while and now I regret being so chickenshit. This might be something that will make my job easier and and improve my understanding of my art, so rather than bellyache about how it's not intutitive to a six year old I'll go learn something (OK, I'll bellyache about partisan programmers too).

      Notice how Larry Wall anticipated visual clues.

      I've been known to anger pythonistas with this blog entry.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    15. Re:Python by synthespian · · Score: 1

      Ah, here it is! I found the refernce the paper on the question whether a semantographic representation is easily learned or not:

      Fuller, D. R. (1985). A response to Luftig and Bersani: An investigation of two variables influencing Blissymbol learnability with nonhandicapped adults. Augmentative and Alternative Communication, 1, 122-123.

      For the context, see my post above.

      --
      Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
    16. Re:Python by Anonymous Coward · · Score: 0

      Good question. Why don't more people look at python? I just recently attended a forum where Greg Stein of Google addressed this issue.
      He obviously thinks python is the "secret sauce"...

    17. Re:Python by Anonymous Coward · · Score: 0
      And, even then, Java takes five times as much code as C to do Hello World:
      #include <stdio.h>
      int main(int argc, char*[] argv) { printf ("Hello world!\n"); return 0; }
      Ooo, two lines. Now, Java:
      import java.io.IOException;
      import java.io.OutputStreamWriter;
       
      public class HelloWorld {
          public static void main(String[] args) {
              try {
                  OutputStreamWriter out = new OutputStreamWriter(System.out);
                  out.println("Hello world!");
              } catch (IOException ioe) {
                  ioe.printStackTrace();
              }
          }
      }
      You have to love how System.out in Java is a BINARY STREAM, and therefore can't accept characters without being properly wrapped. Smart implementation, that.
  27. COMET will save the world! by anonymous_wombat · · Score: 1

    AJAX is so passe.

  28. COBOL, FORTRAN, LISP by Ranger · · Score: 1

    Ooh! Move over Java. The future has never looked brighter for COBOL, FORTRAN, and LISP programmers. They'll soon have Java programmers to rub shoulders, er, uh, walkers with. Of course, I think it was a mistake to move away from paper tapes and punch cards to enter programs. You young programmers can have your Visual Basic, your octothorped C#, and fancy schmancy .NET.

    I'm just typing incoherent nonsense today. But I felt I had to take a swipe at something. I thought I'd create a new computer language called UC or Carbide. Programs would compile OK, but when executed would wipe out thousands of files. Calling it Bhopal would be just too tacky.

    I used to think the Amiga enthusiasts were a bunch of hyper spazzes, but then the Ruby evangelists disabused me of that notion.

    --
    "You'll get nothing, and you'll like it!"
  29. frameworks not language are the key by FecesFlingingRhesus · · Score: 1



    I think it is less about the language and more about the framework. JSP / JSF et. al., are just too bloated with configuration and XML files that leave the new developers scratching their head. If you look at other frameworks such as Echo2 , you can have a developer developing in no time given a familiarity with Java. Frameworks such as Echo have very little configuration to get up and running and provide a very code centric way to deploy web applications they allow a programmer to stay in their domain of expertise and allow for faster production. Lighter frameworks are the key not new languages.

  30. 6 clicks to a web page. by Anonymous Coward · · Score: 0
    With the latest netbeans, it takes 6 (count-em 6) mouse clicks to get to the point where you can type what you want in a jsp. Then one click to build the war file. It's really pretty easy.

    -- ac at work

  31. So did Netcraft confirm this necrolog? by roman_mir · · Score: 1

    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? - Noone turned any features off the language, you can still write anything you want in any possible way you like. The message here is different: Understanding Application Servers is harder for beginner programmers than just the language itself. So, what else is new? Even then Application Servers are not taking away your ability to write any Servlet in the old fashion way. So the book is written by some guy who doesn't want to rely on existing frameworks and likes to recreate them on his own. Well, if he can get paid for that, then kudos, most of us are writing applications that solve business problems and we have neither time nor money to write our own app servers.

  32. Ruby vs. Java by VGPowerlord · · Score: 1
    The big problem I have with Ruby is that people always focus on Ruby on Rails, rather than the language itself.

    News Flash! Rails is not Ruby. It is the current "killer app" (actually a set of libraries) written in Ruby, and you can find similar libraries available for other languages as well.

    --
    GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
  33. Not again... by Eli+Gottlieb · · Score: 1

    I hereby order to author of this book to go read comp.lang.lisp.

    The future has been here for a decade or two. Lisp isn't good for everything (system's programming being the biggest thing because it practically requires pointers and inline assembler), but for the sort of things that Java tends to be used for (databases, web applications, handling large amounts of data, portability) you just can't beat Lisp.

    1. Re:Not again... by arevos · · Score: 1

      I like Lisp, but I've never really been too fond of CLOS. It just seems ugly :(

    2. Re:Not again... by Tiny+Elvis · · Score: 1

      You know what is good for stuff that's ugly? macros. Macros in Common Lisp allow you to abstract away syntax you don't like.

      In any case, you may think CLOS is ugly, but you probably won't find a more powerful object system anywhere.

    3. Re:Not again... by masklinn · · Score: 1

      I hereby order to author of this book to go read comp.lang.lisp.

      That's probably the best way to get disgusted of Lisp for a long time.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    4. Re:Not again... by mios · · Score: 1

      That's not what the folks over at reddit have to say. In fact, the site those reasons exactly as the reason they couldn't continue w/ lisp: + different machines were used in dev/production .. the lisps were diff on diff platforms + no libraries there for web/networking/other things Don't get me wrong, I really enjoy programming in lisp, but where do you get the idea that it can't be beat for web and db development? I've looked over UnCommenWeb ... not all that impressed. And databases? What's out there in the lisp world for databases? Not trolling, I'm genuinely curious to see what you have up your sleeve :-)

    5. Re:Not again... by Anonymous Coward · · Score: 0

      You may be interested in the Movitz project. Step 1: get Common Lisp running on the metal, bare x86 hardware (they're doing reasonably well here) Step 2: ? Step 3: profit

    6. Re:Not again... by Eli+Gottlieb · · Score: 1

      http://www.cliki.net/database

      http://www.cliki.net/networking

      Try searching CLiki for anything you might want. Most of what's there is good stuff.

  34. Re:The pack mentality by symbolic · · Score: 1

    This experience leads him to realize that maybe Java is dying - or at least fading in certain areas.

    It seems to me that this kind of "opinion leading" is part and parcel of the development game. Someone has to be in front, shedding light on alternative approaches. Granted, sometimes change is sorely needed, but other times I get the impression that it's little more than change for the sake of change. This seems particularly true when a certain market segment gets saturated, and a new direction is needed to help those who were at the forefront, well, *stay* at the forefront.

    When I hear/read about stories related to failed projects, projects in trouble, or projects that didn't turn out as well as they might have, I wonder how much if it involves programmers that aren't as well-trained as they maybe should be, and managers and/or organizations that don't have a clue about the dynamics associated with software development. It then leads me to wonder how much certain criticisms like java "bloat" is due to factors that have nothing to do with the language itself.

    Fast forward five more years- lather, rinse, repeat - except this time it may very well be Ruby on the chopping block.

  35. 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.
    1. Re:Beyond Java? by Anonymous Coward · · Score: 0

      OK you win surreal post of the day. Shall I cast the award into that black hole?

  36. 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.

  37. Perl is a dirty whore by Anonymous Coward · · Score: 0

    $|=1;

  38. Programming languages 100 years from now by ZorroXXX · · Score: 1

    In a somewhat related essay, Paul Graham is writing about what he thinks programming languages will be like in 100 years.

    --
    When you are sure of something, you probably are wrong (search for "Unskilled and Unaware of It").
  39. Functional Languages by CypherOz · · Score: 1

    FLs like APL2 and J Jsoftware are the best for real computer scientists. You can do some really kewl thangs that I would never attempt in traditional languages. APL and J let you focus on the real problem.

    --
    You want a signature? You can't handle a signature!!
  40. Re:unpopularity of ST by SolitaryMan · · Score: 1
    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 think that the problem is not static typing itself, the problem is ugly implementations of it people mostly deal with, like in Java, C++ etc. Many people just don't know about "Good" static typing systems as in Haskell or ML.
    --
    May Peace Prevail On Earth
  41. MOD ABUSE by Anonymous Coward · · Score: 0

    Mods - this is not flamebait. It may be uninformed, or any number of things - but it's not flamebait.

  42. 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.
    1. Re:My first experience with C# by Anonymous Coward · · Score: 0

      No offense but it just shows that you do not know how to program in C#/.NET

    2. Re:My first experience with C# by Anonymous Coward · · Score: 0

      Good example code. You obviously have no idea what you are talking about AC.

    3. Re:My first experience with C# by Anonymous Coward · · Score: 0

      If you do it wrong, it doesn't work?
      How utterly surprising!

      If you are supposed to use a Delegate, use a delegate.
      They are nice.

      I've done both C# and Java, and C# is my preference, particularly with some of the functional-language-type features in 2.0.

    4. Re:My first experience with C# by manthrax3 · · Score: 1

      It's just a different paradigm.

      I don't think anyone here would try to compare swing with Windows Forms in any real way.

    5. Re:My first experience with C# by bnenning · · Score: 1

      Wonderful language. Really.

      Your complaint is with the .NET forms library, not the C# language. If the Swing method wasn't threadsafe you'd have to jump through similar hoops in Java.

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
    6. Re:My first experience with C# by I!heartU · · Score: 1

      You could do:

      System.Threading.Thread th = new System.Threading.Thread(new System.Threading.ThreadStart(DoesStuff));
      th.Start();

      then in do stuff protect your UI elements with lock:

      lock (lst_Threads) {
          count = ++m_Counter;
          threadItem = "Created thread with count " + m_Counter;
          lst_Threads.Items.Add(threadItem);
      }

      I wrote up a small program that creates a random number of threads that each run for a minute and output to a list box, if you're interested.

    7. Re:My first experience with C# by Anonymous Coward · · Score: 0

      You're right, nigh impossible, and hard to read too http://msdn2.microsoft.com/system.componentmodel.b ackgroundworker.aspx Another 5 minute expert on Slashdot, what else is new. public Form1() { mWorkerThread.ProgressChanged += new ProgressChangedEventHandler(mWorkerThread_Progress Changed); mWorkerThread.DoWork+=new DoWorkEventHandler(mWorkerThread_DoWork); } void mWorkerThread_DoWork(object sender, DoWorkEventArgs e) { //do work on background thread mWorkerThread.ReportProgress(); } void mWorkerThread_ProgressChanged(object sender, ProgressChangedEventArgs e) { this.mText.Text = e.UserState; } And while we are at it, try this in Java int lValue = 0; SetValueToOne( ref lValue ); //lValue equals 1 Wonderful language. Really.

    8. Re:My first experience with C# by Anonymous Coward · · Score: 0

      You're right, nigh impossible, and hard to read too
      http://msdn2.microsoft.com/system.componentmodel.b ackgroundworker.aspx

      Another 5 minute expert on Slashdot, what else is new.

      public Form1()
              {
                  mWorkerThread.ProgressChanged += new ProgressChangedEventHandler(mWorkerThread_Progress Changed);
                  mWorkerThread.DoWork+=new DoWorkEventHandler(mWorkerThread_DoWork);
              }

              void mWorkerThread_DoWork(object sender, DoWorkEventArgs e)
              { //do work on background thread
                    mWorkerThread.ReportProgress();
              }

              void mWorkerThread_ProgressChanged(object sender, ProgressChangedEventArgs e)
              {
                  this.mText.Text = e.UserState;
              }

      And while we are at it, try this in Java

      int lVal0 = 0;
      int lVal1 = 1;
      Swap( ref lVal0, ref lVal1 ); //Val0 = 1, Val1 = 0

      Wonderful language. Really.

    9. Re:My first experience with C# by AndyS · · Score: 1

      Umm, I'm too lazy to dig up references, but you're not *meant* to do that with Java. You're only meant to manipulate the UI from the UI thread.

      IU think that setText is about the only safe function. We've had actual problems that have been caused by manipulating UI state from the wrong thread.

      What you should have done in your thread is something like

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

  43. PHP by bw-sf · · Score: 1

    PHP out of the box is, indeed, "too close to the HTML", and PHP and HTML code are often interlarded together in the same file. This is fine for quick & dirty applications, but for anything even a little bit more advanced, Smarty templating -- http://smarty.php.net/ -- is a very elegant solution. Logic and layout can be completely separated. It also simplifies the dev cycle: create simple, interim PHP files that just declare arrays and variables stuffed with fake data and have your HTML/front end coders working with that, then when your dev work and db stuff is done the switchover can be seamless if you've done it right.

    1. Re:PHP by VGPowerlord · · Score: 1

      You can also use the ADODB to make database code more portable, or if you have a new enough version of PHP, PDO.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    2. Re:PHP by bw-sf · · Score: 1

      sure, or PEAR DB ...

    3. Re:PHP by VGPowerlord · · Score: 1

      Everything I've heard about PEAR DB paints it as being much slower than the other alternatives. The existence of PDO seems to validate this.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
  44. 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.

    1. Re:Not written by a programmer by jt-Aus-TX · · Score: 1

      He was a damn good programmer when I last worked with him (2000-2001). The Bitter Java books established his creds as a saavy technology writer following years in software development. People who find careers beyond programming -- hiring developers, writing books, etc. -- aren't inadequate or obsoleted by default. But they are honest in admitting that their current gig isn't about coding. (Just my .02, can't speak to your conference experience)

    2. Re:Not written by a programmer by SassyDave · · Score: 1

      You're probably right. Hope you didn't take my comment as an attack on him.

    3. Re:Not written by a programmer by jt-Aus-TX · · Score: 1

      Not at all... I can't stomach non-techie prognosticators either!

  45. Smalltalk? by Z0mb1eman · · Score: 1

    A bit surprised to see Smalltalk in the list of languages to use "beyond java", since (unless I'm wrong) the language is a fair bit older than Java...

    To the more experienced developers on Slashdot - is Smalltalk still used today? I have a decent idea of where the other languages mentioned in the article are used - but the only times I've heard of Smalltalk is generally connected to learning OO concepts. Has it gone the way of Pascal, or is there still some niche outside of academia where it thrives?

    And no, I'm not trolling, it's an honest question :p

    --
    ClutterMe.com - easiest site creation on the Net. Just click and type.
    1. Re:Smalltalk? by jarober61 · · Score: 1

      Smalltalk is most certainly in use. There are multiple vendors, and two open source implementations. See:

      http://www.cincomsmalltalk.com/blog/blogView

      http://smalltalk.cincom.com

      http://squeak.org

      http://www.stic.org

      for some initial pointers.
      --
      Talk Small and Carry a Big Class Library
    2. Re:Smalltalk? by Anonymous Coward · · Score: 0

      Smalltalk is used by many commercial endeavors, and often especially for applications which much change very nimbly. Modern Smalltalks are fast, compact and have all the tools you need including refactoring, unit testing, source code management, etc.

      Cincom, the largest vendor of Smalltalk products recently announced 88% growth in their Smalltalk business over the last year. http://www.cincomsmalltalk.com/

      Croquet, an open source initiative created in Smalltalk by some seriously famous computer scientists including Alan Kay, David A. Smith, David P. Reed is taking aim at creating the future of distributed computing. http://opencroquet.org/

      Smalltalk is alive and well. :-)

    3. Re:Smalltalk? by Anonymous Coward · · Score: 0

      Lots of niches, actually.
      See, for example sorting french fries, or in this larger PDF, scheduling all of Deutsche Bahn's trains (page 38) or derivatives trading (page 33 and here), as well as a a variety of other applications. Or there's an example of controlling a semiconductor fab facility, a good many of which are controlled by Adventa's Smalltalk-based products. Or there's continuation-based web stuff like Seaside or Dabble. etcetera. If you'd really like to know more, you might be interested in upcoming conferences such as Smalltalk Solutions.

    4. Re:Smalltalk? by richieb · · Score: 1
      Alan Kay is doing some really cool reseach projects int SmallTalk. Check out Croquet.

      --
      ...richie - It is a good day to code.
    5. Re:Smalltalk? by Anonymous Coward · · Score: 0

      The C3 project that generated all of the XP hype was written in Smalltalk.

      Of course the project was cancelled when it ran over 3 years late, but that may be more due to XP than Smalltalk.

  46. 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 youknowmewell · · Score: 1

      Oops, it should be like this:

      "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:"

      Don't want people to confuse my words with Eric's.

    2. 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...
    3. Re:Lisp not accessible? by masklinn · · Score: 1

      Lisp isn't accessible? Is that because of the parens or some other reason?

      Definitely the parens, that's what I'm currently trying to get over atm (I'm just done learning the "basics" of Ruby [== I can start doing actual work in ruby] and have decided to pick CLisp as my next language, but I'm having trouble getting my mind to process the parens atm, they burn my brain and screw my eyes.

      Oh well, that'll pass, i'm persistent.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    4. Re:Lisp not accessible? by mad.frog · · Score: 1

      If it's the parens, then obviously people are too superficial to look past the syntax

      Sadly, it's true.

      Hey, here's a challenge for you Lisp-o-philes out there:

      Come up with an alternate syntax for Lisp that is as close to C / C++ / Java as you can manage. (You can even provide a transliteration tool so that source can be seamlessly converted either way.)

      Now give it an entirely new name (e.g., "Emerald" or "Cobra") and don't claim ANY RELATION to Lisp; just promote it as The Next Big Thing in languages.

      When it becomes insanely popular, reveal your subterfuge, then sit back and laugh maniacally.

    5. Re:Lisp not accessible? by be-fan · · Score: 1

      What editor are you using? Lisp really requires a good editor to get the most out of it? If you're on Windows, there are a couple of good Lisp environments, namely Allegro's personal edition. Linux is probably one of the worse platforms to do Lisp development in, since the native Emacs is sub-par in terms of features like anti-aliased fonts, etc. Personally, my favorite Lisp development platform is OS X, since OpenMCL, Emacs.app, and SLIME make one heck of a free Lisp IDE. It's got the creature comforts you'd expect from a modern IDE (syntax highlighting, which helps the parens blend into the background, automatic indentation and parens-matching, which is a must-have for Lisp editing, Safari-integrated API documentation, etc). It's also got some features that are unusual in other editors, like expression-based editing an interactive code evaluation.

      --
      A deep unwavering belief is a sure sign you're missing something...
    6. 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...
    7. Re:Lisp not accessible? by Anonymous Coward · · Score: 0
    8. Re:Lisp not accessible? by Coryoth · · Score: 1

      I have to concur. After several years of programming C++, switching to Lisp was an awesome experience.

      I would think that after several years of C++ pretty much anything is going to look damn good.

      Jedidiah.

    9. Re:Lisp not accessible? by masklinn · · Score: 1

      What editor are you using?

      Good ol' SciTE.

      If you're on Windows, there are a couple of good Lisp environments, namely Allegro's personal edition.

      The only pricing I found on Franz' website is AllegroCL 7.0 for Students and it's $99. There is no way in hell i'm going to pay $100 to learn CLisp.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    10. 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.

    11. Re:Lisp not accessible? by be-fan · · Score: 1

      Tell me about it. It wasn't even modern C++ (which I find at least tolerable). It was C++ in the style of the CORBA C++ binding, which is one of the most hidious APIs ever inflicted on man.

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

      I'm unfamiliar with SciTE, but if it has parens matching and syntax highlighting for Common Lisp, it should be okay. Regarding Allegro: there is a trial edition that's downloadable for free. http://www.franz.com/downloads/trial.lhtml. It has a heap limit of 23MB, though, which means its unusable for some things.

      --
      A deep unwavering belief is a sure sign you're missing something...
    13. Re:Lisp not accessible? by fossa · · Score: 1

      Emacs may well lack some features... but for anti-aliased text one can always run it from an appropriate X terminal emulator. I haven't used it, but there is a version that uses Gtk2 and presumably has anti-aliased text.

    14. Re:Lisp not accessible? by be-fan · · Score: 1

      The terminal emulator version lacks GUI menus, and the GTK2 version doesn't have anti-aliased text for the actual editing area. The GTK2 version is additionally not complient with the GNOME HIG. Emacs.app, on the other hand, blends quite nicely into the OS X GUI.

      --
      A deep unwavering belief is a sure sign you're missing something...
    15. Re:Lisp not accessible? by cortana · · Score: 1

      Although I don't think you are *ever* going to see an Emacs compliant with the Gnome HIG (if you made the necessary changes, people would complain that what you ended up with was no longer Emacs), work is underway to make the GTK backend use XFT for font rendering.

    16. Re:Lisp not accessible? by masklinn · · Score: 1

      I'm unfamiliar with SciTE, but if it has parens matching and syntax highlighting for Common Lisp

      It does

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
  47. Shenanigans! by Weaselmancer · · Score: 1

    I call shenanigans on you, sir. See the MSDN article for yourself.

    http://msdn.microsoft.com/msdnmag/issues/03/02/M ultithreading/

    In particular, pay attention to the .BeginInvoke discussion and the meaning of the InvokeRequired boolean. And, if you know of a better way please feel free to add it as a response to this post.

    --
    Weaselmancer
    rediculous.
    1. Re:Shenanigans! by blaster151 · · Score: 0

      I certainly wouldn't claim that there aren't certain contexts in which Java (or any other language) doesn't make things easier. I do agree that threading in Windows Forms is one of .NET's weak points (although one could argue that the C# language specification offloads most of its threading capability onto the .NET framework, and that the deficiency is in the framework, not in C#, but that's probably splitting hairs). I personally haven't needed to do much graphical multithreading work with C#. I primarily work with middleware and with data-intensive applications, and while that includes some non-trivial user interface development to provide access and analysis services, I haven't encountered many situations where I need to use multithreading to provide responsiveness. In most cases it seems to me that introducing threading incurs a penalty in terms of the complexity of debugging. So, while I'm sympathetic to the frustration you encountered in the sample you posted, my response to your question would be this: Is there a better way to create a new thread from a button click handler and display Hello, world? Not that I know of. But why not just display Hello, world from the button click handler directly without creating the frivolous thread? C# seems up to the task of handling most real-world business requirements and I've found my development efficiency and its runtime efficiency preferable to what I experienced with Java: that's all I'm saying.

    2. Re:Shenanigans! by VGPowerlord · · Score: 1

      I think that the point is so that the program can "provide a snappy, high-quality UI experience even when the program is performing tasks that are inherently slow."

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
  48. Dynamic typing is idiotic by Anonymous Coward · · Score: 0
    When I saw that this book is advocated dynamic typing, I knew this author has no clue.

    Here's what happens with dynamic typing:

    In a really small system, it saves you a few bytes of code because you don't have to type "int" or whatever all over the place. But as the system grows, and as other people start working on the same code, you start running into run-time problems of someone passing in values of the wrong type. In the best possible case that throws a run-time exception. In the worse (and more likely) cases the program will simply behave in an unexpected way. For example if I have a function like:

    function add(a, b) {
    return a + b;
    }
    Because of dynamic typing, that won't fail, whether I send it two ints, or two strings! And yet the behavior and meaning of the function is totally different whether it's with ints or strings. This is certainly wrong, and can very possibly create security problems too.

    So what happens in larger projects of untyped languages like PHP (etc) is that you end up having to write type-checking error-throwing code at the entry to every function! It ends up looking like:

    function add($a, $b) {
    $aInt = intval($a);
    if($aInt != $a) // some error condition

    That is idiotic!

    A lot of the things that help for very fast prototyping, like flexible typing and syntax, just aren't compatible with larger systems with more programmers working on them.

    The answer is to not abandon good programming language design, but rather to come up with toolkits or designers that help automatically generate the right code. Like working with Java Swing is tricky and sometimes unpleasant, so Netbeans has a layout assistant called Matisse that automates the process. Tools like Matisse, Hibernate, etc are the way to go. It sounds like this guy is advocating a return to PHP.

    1. Re:Dynamic typing is idiotic by arevos · · Score: 1
      That is idiotic!

      Yes, it is true that if you have an idiotic coder, he's going to make more mistakes in a dynamically typed language than a statically typed one. However, it's generally not a good idea to hire idiots anyway. Yes, dynamic typing gives the programmer more rope to hang himself, but an intelligent programmer will make use of that extra length in ways other than creating a noose.

      The answer is to not abandon good programming language design, but rather to come up with toolkits or designers that help automatically generate the right code

      Code generation has it's limits, and only goes part way to making up for the disadvantages of static typing. Personally, I prefer a language that is flexible enough not to require code generation. But that's merely my opinion.

    2. Re:Dynamic typing is idiotic by Anonymous Coward · · Score: 0
      On any big system (software systems included), whatever can go wrong will go wrong. That's just how big systems are. The way to defeat that tendency is to build the system from small components which are known to be correct, and put them together in ways which are also correct. By doing that, you end up with an entire system that is correct. But the key to this is having even the smallest components be verifiably correct. And the only realistic way you can do this is by having each bit of the system have a contract between input and output. "If you give me this as the input, I'll give you that as the output." You build the entire system based on these contracts.

      In a dynamic typed language, these contracts become a mess. The function could receive an input of any value, of any type! The only way to enforce contracts in that is to put type-checking code at the start of every function. So you get all the disadvantages of a staticly typed language and all the disadvantages of dynamic typing at the same time.

      Dynamic typing is a disaster. That, plus free access to memory, are responsible for most security holes and most bugs. C suffers from both of these because pointers are not really typed.

      Java still has some dynamic typing in it, in that the old Collections framework required casting to/from Object. The new system has generics, which allow the compiler to check. The bytecode still does the casting (just like before) but at least the compiler will catch the errors.

    3. Re:Dynamic typing is idiotic by arevos · · Score: 1
      But the key to this is having even the smallest components be verifiably correct. And the only realistic way you can do this is by having each bit of the system have a contract between input and output. "If you give me this as the input, I'll give you that as the output." You build the entire system based on these contracts.

      Static typing doesn't do this. Oh, it ensures the types match, but it does nothing more than this. In order to ensure the input and output are correct, you need preconditions and postconditions. Java doesn't explicitly support these, and I can't think of a reasonable way they could be implemented at compile time. Fortunately, unit testing and assertions can go some way to making up for this.

      In a dynamic typed language, these contracts become a mess. The function could receive an input of any value, of any type! The only way to enforce contracts in that is to put type-checking code at the start of every function. So you get all the disadvantages of a staticly typed language and all the disadvantages of dynamic typing at the same time.

      You seem to be a little confused. There wouldn't be any point in putting type-checking code at the start of functions in a strongly dynamic language, because the types would still be checked at runtime - which they are by default, anyway. The reason static typing is useful is because it happens at compile time. But it is of limited use. It only catches type errors, which is a very small subset of ensuring programming correctness.

      Type errors, even in dynamic programming languages, are rare. I program in Python often, yet I can't recall the last time I came across a type error. Nor have I ever come across anyone who programs in a dynamic language that views type errors as a common problem. Case in point is the original poster you replied to. I believe he pointed out the same thing; that type errors simply aren't that big a problem.

      The only way to ensure that all components of a system work together, is either to be extremely methodical and justify every line of your code with a mathematical proof (ala Z), or to unit test as much as humanly possible. I don't see the former as being practical in any large system, which leaves only the latter. And Java has no intrinsic unit testing advantage over Python.

    4. Re:Dynamic typing is idiotic by JustAClam · · Score: 1
      Coward,

      What's a large system to you. Using PHP as the definitive dynamic language suggests that you might be the clueless one. Dynamic languages can let you deliver a lot more business value and change it a lot faster than the alternative. Depending on the language, the tools and the practices involved, the product doesn't need to be of lower quality than something produced with a statically typed language. For the same amount of money, you can frequently get something that is higher quality.

      I've done both, on systems involving more than 50 man-years (each) to develop and enhance, and the dynamically typed software systems held up their end quality-wise and delivered more busines value than the statically typed systems.

      Things I learned. You CAN write FORTRAN in any language. (I had a friend who had written it in 4 or 5). You CAN write bad code in any language and projects using any language can fail. In my experience, the likelihood of project failure is directly proportional to the number of developers required to build it, the cost in dollars (in large companies, the number of managers involved).

      You should READ THE BOOK, rather than offering an opinion based on your prejudices and preconceptions. The controversial numbers in the book say that, for a very small Java system - 2 man-months of effort, 3000 lines of Java, 1100 lines of non-Jave (XML, etc) and 62 classes with 550 methods, the equivalent using Ruby on Rails took 20 hours, 1100 lines of Ruby, 113 lines of non-Ruby and include 55 classes and 125 methods. Further, the Ruby system ran faster, out of the box than the Java system. (Beyond Java, p. 123) Not bad.

      To be fair to Java,

      • The same people had written the same system twice, with Ruby having the advantage of going second
      • This isn't that big
      • This is just one example

      It still suggests however, that there might be something valuable here.

      You SHOULD read the book before deciding that the author is the one that doesn't have a clue.

      Just crank the arrogance slider down 2 notches for me, ok? And sign your posts. Doing otherwise, unless it puts you job in jeopardy or your life in danger, just discredits you and/or your ideas.

  49. Re:Author: cheerleader for Ruby but has good point by Anonymous Coward · · Score: 0

    Listen up, Ruby evangelists: You need to get Ruby running natively in the JVM like Jython! Then you'd have the KILLER language.

    You mean like JRuby?

  50. My vote by caudron · · Score: 1

    Viva la Visual Basic 6.0!

    --
    -Tom
  51. PHP is a Primary not Secondary Contender by bfioca · · Score: 1

    Enterprise Integration - PHP Frameworks like WASP (and Zend's own) are on their way there.

    Internet Focus - PHP is certainly that.

    Interoperability - PHP Frameworks are very abstracted, and PHP has PECL connectivity to Java

    Dynamic typing, OO, reflection - PHP 5 has all of those.

    PHP itself may be too close to HTML, but that's what frameworks are for... You could say the same things about JSP/ASP. read this for more info on PHP frameworks

    1. Re:PHP is a Primary not Secondary Contender by Anonymous Coward · · Score: 0

      PHP is not Java. And trying to make it into java is a fool's errand. When you decide on a language you should embrace it, for good and bad, not transform it into what you're more previously comfortable with. WASP is not a solution, its a bandaid for somsone who likes Java and got pushed into PHP.

    2. Re:PHP is a Primary not Secondary Contender by bfioca · · Score: 1
      Using this reasoning, you just invalidated both Java and C#.

      Java was a bandaid for people who liked C++.

      C# was a bandaid for people who liked Java...

      What would you propose? Something entirely new? Why introduce a learning curve when you can build on existing knowledge?

    3. Re:PHP is a Primary not Secondary Contender by CodeoRowboy · · Score: 1

      Who said WASP made PHP more like Java? WASP is a framework that makes PHP development easier. The article is about languages that could supplant Java. PHP is mentioned as second tier - I think it should be first tier when coupled with a good framework. It has a lot of the capabilities the author quoted when used inside of a structured framework.

      PHP alone could be second tier. With the addition of a framework (WASP or ZEND) it is more likely a first tier potential to replace Java - though it definitely has quite a bit of competition. As a developer I am glad to see more and more thought go into the creation and growth of languages - it just makes it that much easier to select a tool to get the job done.

  52. 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#.

  53. I don't get it by ENOENT · · Score: 0

    Java is a bad language because servlets are a pain?

    Wow, that's like saying C++ is a bad language because Outlook sucks.

    --
    That's "Mr. Soulless Automaton" to you, Bub.
    1. Re:I don't get it by bfioca · · Score: 1
      I agree that the supposition that servlets are too complex is a bit of a stretch, but it seems you might be missing the point when you say that Java is a bad language.

      The book doesn't seem to be saying that Java is a bad language, that that it has reached its peak of usefulness and will be supplanted by some new technology in the future. This is the inevitable progression of programming technology - increase in abstraction moving away from low level details.

      Assembly -> C -> C++ -> Java -> something new.

    2. Re:I don't get it by Billly+Gates · · Score: 1

      This is why Java Server Faces are taking over to streamline Servlet development. You can include custom tags right in html like php from what I heard. I have not used them yet but they look promising.

    3. Re:I don't get it by Anonymous Coward · · Score: 0

      The book doesn't seem to be saying that Java is a bad language, that that it has reached its peak of usefulness and will be supplanted by some new technology in the future. This is the inevitable progression of programming technology - increase in abstraction moving away from low level details.

      Assembly -> C -> C++ -> Java -> something new.


      So what you are saying is change for change's sake? I don't know who came up with this "peak of usefulness" crap, but it serves to book-selling purposes pretty well it seems.

      Java is evolving and I believe the closest thing to it, a real competitor, would be C#.

      If you want to get into the geeky talk of "language theory" of who said this, who said that, without a foot in the real world other than HelloWorlds, well, just ignore this comment.

      Java 6 will have a standard scripting API with a Javascript implementation. We already have Jython and JRuby. I really don't know what you're talking about.

    4. Re:I don't get it by bfioca · · Score: 1

      JSF has been around for a while, but unfortunately they have faced some adoption pains... They are certainly promising, but my feeling is they are much like EJBs in that they are far more complex and broad in scope than is generally need for most cases.

    5. Re:I don't get it by bfioca · · Score: 1
      If you'll notice i certainly did not imply change for change's sake. What I'm saying is that as a programming language ages, it has to grow and adapt to new technologies. As it grows, it begins to incorporate complexy involved in both supporting new ways of writing software, and keeping backward compatibility. After large periods of time, the breadth of the language (and supporting libraries) is sprawling and complex. It is usually then when someone starts from scratch to address the leading methods of writing applications of the time. They don't have to worry as much about backward compatibilty and usually create simpler frameworks and methods. They also have the benefit of writing for newer hardware, which may allow for additional abstraction of things (memory management, strong typing) that were usually necessary to worry about before.

      To say that C# is the closest thing to Java is accurate. To say that C# will supplant Java is probably wrong, though, because C# is already so much like Java (it was designed that way).

    6. Re:I don't get it by rdean400 · · Score: 1

      That is why there are tools out there (like Java Studio Creator 2) to make it easier to deal with the complexity, or hide the complexity altogether.

      I think this is the hole in Tate's thesis: the supposition that the next great shift will require a new language. There are innovations going on outside of Java (Ruby on Rails is a great example), but that doesn't mean that Java is incapable. Syntactical brevity or lines of code comparisons are less meaningful when the output isn't hand-coded.

  54. That's why C is still the best by mangu · · Score: 1
    I've done both styles quite a lot, and I can say that static typing really is overrated.


    Static, dynamic, which is the best? It depends. Sometimes you need more power, sometimes you need more security. With C, you can have the security of strong typing, with the power of dynamic typing, by using casts.


    What people who don't like C fail to realize is that C gives you the best of all worlds. You can write Java in C, just don't use pointers, don't use casts, and use the strictest syntax checking options in the compiler settings. You can write Perl in C, just use one of the several string manipulation and regexp libraries available.


    Why stay locked forever in a language designed for beginners? You are a beginner only once, after you learn the basics you will need power, more than security. If you want efficiency, you need control, you need to know exactly how your code works.


    I use a lot of small, quick, and dirty scripts in other languages, mostly Bash, Perl, PHP, and Python, but for deliverable professional work, there's only one language: C.

    1. Re:That's why C is still the best by bnenning · · Score: 1

      With C, you can have the security of strong typing, with the power of dynamic typing, by using casts.

      Casting is not remotely a replacement for dynamic typing.

      Why stay locked forever in a language designed for beginners?

      This is the Mac fallacy. That a product is usable by beginners does not imply that it's unsuitable for experienced users.

      for deliverable professional work, there's only one language: C.

      Good grief.

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
    2. Re:That's why C is still the best by mclaincausey · · Score: 1
      With C, you can have the security of strong typing, with the power of dynamic typing, by using casts.
      Not the same thing. Also requires a lot of manual memory management, which is a bigger source of bugs than those a weakly typed compiler misses. I prefer static, strong typing, but I have to point this out.
      You can write Perl in C, just use one of the several string manipulation and regexp libraries available.
      Specifically, lex can allow you to create parsers and other regex machines trivially. But it's still easier to do it with Perl or particularly awk.
      Why stay locked forever in a language designed for beginners?
      What language are you referring to? C++ was designed as a beginner's language (or at least Stroustrop had an academic approach in the design), as was Smalltalk. Java might be taught as an introductory language (my program taught C++) in some places, but that doesn't make it a language for "beginners." It's a widely-used, enterprise-grade language that allows for rapid development of secure apps, it's not some toy.

      Languages are just tools. You use the right language for the job. If you're building an enterprise-grade Web application that has changing requirements, heavy dependence on a middleware layer, and must be portable, perhaps Java is what you need. If you're writing drivers or client-side software for a known platform, then C would be what you use. I'm not saying these are the only applications for these languages, those are just examples.

      Sure, C is the most powerful higher-level language. That doesn't mean it's cost-effective for every project.

      --
      (%i1) factor(777353);
      (%o1) 777353
    3. Re:That's why C is still the best by jgrahn · · Score: 1
      Static, dynamic, which is the best? It depends. Sometimes you need more power, sometimes you need more security. With C, you can have the security of strong typing, with the power of dynamic typing, by using casts.

      Uh, surely you're joking? Casting is, at best, type conversion. At worst, it is invoking undefined behavior, or botching the type system completely. In any case, it's never dynamic typing. Dynamic typing is when your program doesn't know until runtime what type it should consider a certain object (reference, name, block of memory) to have. C always knows that. (And C++ always knows that, except for polymorphism and templates.)

      I use a lot of small, quick, and dirty scripts in other languages, mostly Bash, Perl, PHP, and Python, but for deliverable professional work, there's only one language: C.

      In some [large] areas, that's true, and I happen to believe that there should be a pure C API to all important algorithms, windowing systems and so on ... But believing that Python (or Bourne shell, or perl) is undeliverable and unprofessional -- that's 1980s thinking. Contraproductive.

    4. Re:That's why C is still the best by mangu · · Score: 1
      Casting is, at best, type conversion. At worst, it is invoking undefined behavior, or botching the type system completely. In any case, it's never dynamic typing. Dynamic typing is when your program doesn't know until runtime what type it should consider a certain object (reference, name, block of memory) to have. C always knows that.


      Oh, sure, C always knows what type it's handling. Even Lisp knows that, a language that doesn't know what type it's handling would be useless. But the dynamic/weak distinction you are nitpicking about is purely academic, the only difference is that, for a language that tolerates some flexibility in types, if the language is compiled it has to check the type at compile time ("weak") and if the language is interpreted it can check the type at run time ("dynamic"). But the use for "weak" typing is the same as the use for "dynamic" typing. An example of the flexibility allowed by C is the following: void qsort(void *base, size_t nmemb, size_t size, int(*compar) (const void *, const void *));


      If C were "strong"/"static" typed, you would need a different quicksort function for each type of variable, with "weak"/"dynamic" typing, the same function can be reused. I don't care about the morphological difference between "weak" and "dynamic", because semantically they are the same.


      believing that Python (or Bourne shell, or perl) is undeliverable and unprofessional -- that's 1980s thinking. Contraproductive.


      There are two issues here: reliability and size. Generally, the programs I develop professionally are much bigger than the scripts I write from time to time in interpreted languages. I have found that interpreted languages are too slow for very big programs. And too often they fail when pushed to the limit.


      A recent experience I had was when I had to port a system with 400k lines from VAX Fortran to a PC hardware. After trying all the commercial Fortran compilers I could find, no one could compile the whole system wihtout a significant amount of errors. Looking for a quick way to study the problem, I thought of writing a Fortran interpreter that could at least parse those 400k lines to see what were the main problems. I found the PLY project, a lex/yacc program in Python. A four function calculator in PLY works OK, but when I tried to make it run a full-fledged VAX Fortran parser it crashed. Using exactly the same Fortran language specification in flex/bison worked OK.


      Unfortunately, that seems a pretty common experience, interpreted languages are OK for small systems, but aren't scalable to amny of the large problems professional programmers find in real life. At best, one gets the painfully slow start up times in big systems, like Open Office, SAP, or Eclipse, (all of which have significant amounts of Java code) for instance.

  55. 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.

  56. 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 finnif · · Score: 1

      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.
      C#/.NET. Seriously. Objective-C and Cocoa are nice, but I was in love when I first sat down to use C# with the .NET framework in VS. 2005 is a huge step forward, and you can download it for free to check it out. I develop UI apps exclusively in it and it's great (though I have been working with ASP.NET a little recently).

    2. Re:Application Programming by Scarblac · · Score: 1

      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?

      We're just in the part of the cycle now where everything is client/server; specifically, web apps. I've worked at three software companies in the last five years, and it's all either websites or web apps. Perhaps it'll all be different again in five or ten years, but for now, companies seem to want web apps. In my experience, and in the Netherlands, anyway.

      Every computer already has the client installed, there's a huge global network so you can connect to the server from everywhere (in case you want to have that functionality), and all the parts (clients, servers, networks) are fast enough nowadays. So the client/server model is on top at the moment.

      --
      I believe posters are recognized by their sig. So I made one.
    3. Re:Application Programming by dkf · · Score: 1
      Will I code the apps themselves in Ruby? No!

      Why not? Have you tried, or are you just being predjudiced against those languages commonly called "scripting languages" because of some mis-heard sounding off by someone who should know better? Ruby (and Tcl and Perl and Python and ...) is first-and-foremost a programming language. It happens to be implemented using an interpreter, but that really just means that the level of complexity of the primitives is a bit different to what you're probably used to.

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    4. 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.
    5. Re:Application Programming by Anonymous Coward · · Score: 0

      I have billed and collected over 3 million dollars over the last 10 years writing Java Desktop Applications. I don't see an end to it. I just keep getting more work from referrals. Thin Client / Server is fine. But all my work has been with Thick Clients. Granted I get paid a lot since most Java people don't like to write Desktop Applications.

      To you Java people who only write web applications I say " Thanks, stay there and keep yourself busy :)"

      This was a fun thread. But, time is money and I have all my time sold already for 2006 and 2007

      Enjoy your app servers.

    6. Re:Application Programming by IdahoEv · · Score: 1

      My dayjob is custom LAMP stuff; I love PHP. But in the evenings I've been working on a standalone app, and it seems odd to me too that nobody ever talks about standalone apps anymore. I mean hell - 95% of the crap installed on any computer is standalone so somebody is programming it. Is it all just winders c++ coders that don't read slashdot?

      Anyway, the criteria for my app: (1) friendly GUI for non-geek end users. (2) Real-time signal analysis of live audio streams, so it must crunch huge quantities of numbers quickly. (3) Minimal effort to deliver both Win and Mac compatibility, since our customer base is a mix of artistic and educational types. (4) Code and any porting done by a two-person team working a couple nights per week in their spare time -- we both have day jobs.

      Given the criteria, there really was no other choice than Java. Our app live-processes data from a microphone input. And there is not one byte of code difference between the shipping versions of the windows and mac versions. Hardware interface, gui, everything. A few mac customizations are handled by command line arguments, but we only have one code tree for two platforms - even though we're doing hardware audio I/O. Can Ruby do that?

      The right tool for the right job. My options for this project were Java and C++ ... and the latter would have been a mother to port, using different GUI and Audio APIs on two platforms; the only part I could have saved was the signal processing code. Call it 180% as much effort.

      --
      I stole this sig from someone cleverer than me.
    7. Re:Application Programming by ceoyoyo · · Score: 1

      Me too. Most apps that interact with the user spend most of their time sitting around waiting for events. That stuff is very suitable for writing in an interpreted language. I tend to write anything that's going to be a performance problem in ObjC as a thread and then launch it from Python.

    8. Re:Application Programming by jdgreen7 · · Score: 1

      For C++, there's always ClanLib. :-)

  57. 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'.

    1. Re:What about C# on Mono by masklinn · · Score: 1

      Mono unlike Java, is 'open source'.

      Well, even though all of them pretty much suck there is half a dozen open source JVMs out there.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    2. Re:What about C# on Mono by feijai · · Score: 1

      It appears you completely misread my posting! What's more, someone moderated a complete misreading as insightful. :-)

  58. Kobayashi Maru by Weaselmancer · · Score: 1

    So, while I'm sympathetic to the frustration you encountered in the sample you posted, my response to your question would be this: Is there a better way to create a new thread from a button click handler and display Hello, world?

    Well, of course there is. But rather than post my entire application (which definitely needs threads since they're polling hardware, and they definitely need access to the UI since that's where the status gauges are) I figured a small demonstration program would be more appropriate. Just saying "threads are difficult, do you really need them anyways" is hardly a fix.

    --
    Weaselmancer
    rediculous.
    1. Re:Kobayashi Maru by Anonymous Coward · · Score: 0

      Of course, unless you need to query the hardware and display the results at a rate of more than, say, 1000 times per second, you could have just used a Timer component and leave the threading complexity behind...

      -Mark

  59. Shouldn't this read... by C_Kode · · Score: 1

    "I recently got sent a copy of Bruce Tate's newest book Beyond Java - A Glimpse at the Future of Programming Languages.

    Shouldn't this read:

    "I recently got sent a copy of Bruce Tate's newest book Beyond Java - A Glimpse at the Future of Programming in Ruby.

    I see nothing about "future programming languages", I see "Ruby is the next big thing!"

  60. Amazon has it cheaper by heffel · · Score: 1

    Amazon has it for 16.47

  61. I find myself suspicious of static typing by Julian+Morrison · · Score: 1

    Static typing pretends to eliminate type bugs, but I find myself suspicous that its real effect in most cases is to lull a false sense of security. Consider the zillion bugs in Java from casting to Object and back!

    For a full coverage, mathematically provable type system, take a look at SPARK Ada. It has detailed coverage annotations, no dynamic allocation, no recursion, no exceptions, no overloading or polymorphism. Until recently it had no threading. That's what you have to sacrifice to get a type system that works! Ergo, any more flexible language has holes in its armor. If you expected it to be impregnable, you have a nasty surprise coming.

    Dynamic typing, at least, is honest about its limitations.

    1. Re:I find myself suspicious of static typing by mad.frog · · Score: 1

      Consider the zillion bugs in Java from casting to Object and back!

      Since the whole point of casting is to subvert the type system, yeah, no kidding.

      I'm a huge fan of static typing, personally, but Java made a huge mistake in encouraging casting in this way. To me, anytime you have to do a cast (in any language), it's a sign that your design has failed. If the language doesn't make it possible to avoid casting of this sort, the type system needs rethinking.

  62. Beyond java? by butterwise · · Score: 0

    For me, the crapper is always the first thing beyond my first cuppa joe every morning.

    --
    If a baby duck is a "duckling," why would anyone want to eat "dumplings?"
  63. Uh, read then reply please. by Some+Random+Username · · Score: 1

    Function overloading doesn't exist everywhere, and where it does, you are still writing two functions. Just because they have the same name doesn't mean its not a waste of time.

    I didn't advocate dynamic typing, if you read the post you'll see I advocated a static language that gives you the best of both worlds:

    int|float do_foo(int|float x) {...}

    1. Re:Uh, read then reply please. by radish · · Score: 1

      But in most cases a difference in incoming type will force a difference in how you handle it, hence different methods. Sure, there will be commonality, and that's where your two overloaded methods do some prep work and then call a third common method to do the rest. Neat and elegant. When you _really_ don't care which of the permissiable types you've been give, well that's what inheritence was invented for. The other nice thing about using a supertype is that future maintainers can plugin new types you hadn't thought of and still use your method without an edit & recompile. Makes a lot more sense to me that adding yet another "|something" into the signature of every method.

      I'm sorry but I did read your post and I don't see that solution as being the best of either world, never mind both.

      --

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

    2. Re:Uh, read then reply please. by Some+Random+Username · · Score: 1

      In lots of cases how you handle the incoming type is the same. And lots of languages don't let you inherit base types because they aren't objects.

      I never said you couldn't do everything in a statically typed language that you can in a dynamically typed one. I said that dynamically typed languages allow you to do more, in a more flexible way, with less code. If you don't want to make the trade off that's up to you, but pretending that dynamic typing doesn't offer anything is rediculous.

  64. 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.

    1. Re:Don't confuse dynamic with weak typing by AndyS · · Score: 1

      Other than using JNI, when is Java static/weak?

      Besides, the "weak/strong" 'typing' to which you refer too isn't so much the typing, but how sound the operational semantics are - are there any cases when the language can lead to strange and wacky error conditions. Using the phrase "sound" and "unsound" instead of strong and weak might be somewhat better.

      Also, surely the existence of unsafePerformIO and arguably even the FFI could make Haskell unsound?

      My big beef with the dynamic typing camp is that they seem to believe that static typing only buys you the power of Java and that you have to specify every type. Every argument against Java and for something else utterly ignores typing - basically saying "look, we can pass an anonymous function to a list, which Java can't do, and because Java is statically typed and we're not then it must be down to static typing", ignoring the fact that you can do the same in a lot of fine statically typed languages. The expressivity of Java is the problem, not the level of typing or otherwise.

  65. Java is a mess by tb3 · · Score: 1, Insightful

    The entire Java platform is a mess, it's so complex that most of the Java applications out there are solutions to problems caused by the platform itself.

    XDoclet is a great example. Here is a program that reads JavaDoc headers in your EJB source files and looks for special comments. Then, together with Ant and Ant build files, it creates the server XML files that your J2EE app server needs to deploy the EJB. This saves you from writing the XML yourself. What's wrong with this picture?

    And XDoclet itself is so complex that there's an entire book from Manning about it!

    --

    www.lucernesys.comHorizon: Calendar-based personal finance

    1. Re:Java is a mess by Stu+Charlton · · Score: 1

      Java's not that much of a mess, it's just a big thing that targets lots of people, and so there's a lot to it.

      Also note, XDoclet isn't a part of the Java platform, it's a community project. There's plenty of examples of that in any language/platform... CPAN for Perl, Ruby gems for Ruby, etc...

      Deployment descriptors aren't broken, the issue is that they don't recognize that developers sometimes make policy decisions at the early parts of a project, so it make sense to keep that declarative stuff close to the code. Yet you still need the external XML file to override the declarative policy, as needed. EJB 3 adopts this approach....

      --
      -Stu
    2. Re:Java is a mess by tb3 · · Score: 1

      What I'm saying is that XDoclet is an attempt to fix something broken or cumbersome in the J2EE standard, and it ends up being big and cumbersome, too. Nothing in Java is ever simple, at least nothing in J2EE. There's no way to slim down from the bits you don't need, everything is intertwined.

      And more bits get added every day. Servlets weren't good enough, so they added JSP. That needed Struts. That needed Faces. JDBC wasn't good enough, so you got Hibernate. But none of these are replacements, they all build on the previous, increasing the complexity.

      Sure you can teach kids in college basic Java, and J2SE, but the server stuff is almost impenetrable. Where do you start?

      --

      www.lucernesys.comHorizon: Calendar-based personal finance

    3. Re:Java is a mess by Anonymous Coward · · Score: 0

      Sure you can teach kids in college basic Java, and J2SE, but the server stuff is almost impenetrable. Where do you start?

      Start by ignoring the J2EE 'frameworks' ... despite what consultants insist, you DO NOT need to use Struts to produce server-side apps. You DO NOT need Hibernate to talk to a DBMS. You DO NOT need JSF to write client-side display code.

      Go back to the basics. The frameworks are only useful for large-scale development (involving lots of developers). They are entirely inappropriate for smaller projects. If you underatand the CGI request/response model, you can write Java server-side code without any framework at all (and with significantly less code/config than required by a framework).

      Large-scale development tends to have drivers that are not based on technology and provide a fertile ground for all sorts of nonsense frameworks and the consultants that feed on them. Do not listen to these people. They are like fashion mavens (Ruby is the new black).

    4. Re:Java is a mess by peter_gzowski · · Score: 1

      First, let's distinguish between Java and J2EE. The whole deployment descriptor problem in J2EE is the problem you're describing, not so much an inherent problem with Java. XDoclet grew out of a desire to simplify the generation of deployment descriptors. If you've ever hand-coded a deployment descriptor, I think you'd be happy to read the manual for XDoclet. Generating deployment descriptors based on XDoclet tasks also makes it easier to keep a team synchronized, and helps avoid problems like having an EJB method which you forget to write the associated interface for.

      Anyway, there seems to me to be two ways to solve this problem: add something to the language that makes it easy to express the attributes of a method (which is what annotations in Java 5.0 are supposed to do), or simplify J2EE deployment (which is what is supposed to be happening in EJB 3.0). I don't think the Java platform is a mess, and I think the J2EE platform is moving towards not being a mess.

      --
      "Now gluttony and exploitation serves eight!" - TV's Frank
  66. Closures by Anonymous Coward · · Score: 0

    Any language that claims (as Python does) that it allows programming in a functional way but lacks closures isn't anything but a con.

    1. Re:Closures by Anonymous Coward · · Score: 0
      Um, he asked you to defend Perl. Not attack Python.

      And anyway, Python does have closures (although mutating enclosing scopes, as opposed to merely accessing them, is a bit kludgy). Note too that a lot of stuff done via closures is more cleanly done via generators in Python.

  67. Finally, getting there! by Debiant · · Score: 1

    Just though to post a small insight to matter. My opinion is that a good programmer can almost anything with any language.
    Yes certainly there are diffrences how long something can take and how easy/difficult it is. There are some limitations of course what are ready libraries etc.

    But honestly, put your palmas to your chest near your heart, how much real life problems in programming have much to do with any specific languages and it's features?

    I've done in 3 month in a J2EE course my first real 3-tier and J2EE application in two weeks. A bit over week went to planning, rest to coding.
    I've done much less with PHP in few weeks because customer doesn't know what he wants and there isn't documentation to begin with.

    I don't care about language, give me people who know what they want and somebody who can organize well it's coding!
    I'd argue most of waste in effiency and speed in programming isn't lost to weaknesses of some language, but weakness of organization communication and generally people not being up to the job.

    Is it PHP, JAVA, Python, or Ruby on Rails are just a seconday issues.

    --
    Nobody knows the trouble I've seen, nobody knows has the trouble seen me, even I sometimes wonder why I write these line
  68. Python, Java, Dynamic, static etc and back to Java by Anonymous Coward · · Score: 0

    Python (Ruby, Perl etc) is a nice scripting language/small scale application development language.

    Java is a great large scale application development language.

    Comparing the two is like comparing a Cirrus aircraft with an Airbus.... It really does not make sense. Use the Cirrus to zip around quickly and with little cost. Use the Airbus to do work of shuttling hundreds of people at a time. Yes - the Cirrus will cost less and be more flexible (dynamic) but hey - that's the point. The Airbus is not supposed to be dynamic - its safe.

    Ok - we have been doing serious Python large scale applications since 2000. We are switching to Java - especially with 1.5 and Eclipse. I will not bank at a bank that uses Python for their back end. Java will do.

    Cheerio. Hardy

  69. Save $8.48 by Anonymous Coward · · Score: 0

    Save yourself $8.48 by buying the book here: Beyond Java. And if you use the "secret" A9.com discount, you can save an extra 1.57%!

  70. Re:Author: cheerleader for Ruby but has good point by swimmar132 · · Score: 1

    Just a quick comment, Ruby does have regular expressions built into the language.

  71. Re:frameworks not language are the key by finnif · · Score: 1

    I think it is less about the language and more about the framework. JSP / JSF et. al., are just too bloated with configuration and XML files that leave the new developers scratching their head.

    Bingo. This is exactly what's wrong with Java today and right about Ruby on Rails. The same kind of configuration that Hibernate uses XML for is done with simple methods in Ruby. Java is still far more powerful than Ruby... it has far more available for it, it's a very fast language whereas Ruby is not, and has more knowledge out there. But these XML configuration files are a beast to get around when you're just trying to learn how to do Hello World or simple CRUD.

  72. Here you go! by mkcmkc · · Score: 1
    please provide some meat to that aspersion

    http://www.mathdogs.com/people/mkc/perl-puzzles.ht ml

    --
    "Not an actor, but he plays one on TV."
  73. No! No! No! Judge by the whole package by Bozovision · · Score: 1
    There's a lot of discussion here about the value of particular technical characteristics - static vs dynamic typing, separation of M, V, and C, interpreted vs compiled, lalalala.

    The measure of a language is not just about the technical characteristics: there is always a language with some better technical gadgets than the one that you are using at the moment. (And some drawbacks.)

    No, you have to judge a language by the package of features that are important to your project.

    By that I don't mean the technical aspects alone, although they form a part; here are some non-technical aspects that are critical to whether you adopt a particular language for a particular task:
    • Is the community that uses the language growing or shrinking?
    • What's the profile of the commumity? Hobbyists? Professionals? Leading edge or trailing?
    • Is the language standardised and how many implementations are there?
    • How much information is there? Support is important.
    • What libraries are available?
    • Is there an open source implementation of the language?
    • Are there well-developed test packs?
    • What's the pace of development of the language?
    • And I'm sure there are some that are important to your project that I've left out.


    And lastly, what technical characteristics does the language have that will make the job easier?

    For ages it's been on my todo list to write something about this on my blog; I've got to make a decision about what language to use for a project that will last a few years.
  74. Re:Lisp not accessible by Scarblac · · Score: 1

    If it's the parens, then obviously people are too superficial to look past the syntax

    Sadly, it's true.

    It's true, but the people that are held back by that are the same people who wouldn't try Python because of the indentation, Perl because of the "line noise", C++ for its odd streams / template syntax, etc etc. One shudders to think what they would think of actually fundamentally different languages, like Haskell or Prolog, but luckily they probably won't ever be exposed to them.

    In short, those are the people who don't want to switch to something that's not exactly like what they already know. And if there's ever going to be a move in this industry to actually better ways to do development, these sheep who are scared by mere parens will not be the ones to initiate the move. So why cater to them? They'll follow the hype once it's there, or more likely be left behind because they didn't want to learn anything new.

    --
    I believe posters are recognized by their sig. So I made one.
  75. Agile Web Development with Ruby on Rails by soundofthemoon · · Score: 1

    This is the only extant book on Ruby on Rails: Agile Web Development with Ruby on Rails . There are about a half dozen others that will be available later this year, but the Agile book is quite good and sufficent to get you started.

  76. beyond? by drew · · Score: 1

    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.

    What if I still prefer to program in C?

    That same example now requires deployment descriptors, packaging into WAR files, configuration files, etc, etc. For Java developers, this is the norm

    I looked into Java several times as a potential replacement for PHP, and I honestly never really made it past this part. Thanks, but I'd rather just put my file in the docroot and be done with it. The only explanation I've ever been able to figure out for this madness is that somewhere along the line, Sun realized that they were pushing to hard on the "Java is easy to program" button. When developers started feeling like their fat paychecks were being threatened, they had to figure out a way to make it more confusing and make the whole process just as complicated as it would be with a "less efficient" language.

    --
    If I don't put anything here, will anyone recognize me anymore?
    1. 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.

  77. PHP "too close to the HTML" by alucinor · · Score: 1

    The author says that PHP is "too close to the HTML". But it's also really close to the XML. That makes PHP a perfect fit for SOA and its conclusion, the Semantic Web.

    --
    random underscore blankspace at ya know hoo dot comedy.
    1. Re:PHP "too close to the HTML" by Anonymous Coward · · Score: 0

      lol - no. Making XML by gluing strings together is just a bad idea. And PHP and RDF? There's an odd couple.

  78. SML and automatic types by Anonymous Coward · · Score: 0

    Standard ML has an even better feature than static or dynamic typing -- automatic type inference. It is both very powerful (catch all typing errors at compile time) yet does not make you jump through hoops to declare or change types. I recommend you check it out sometime.

    http://smlnj.org/

  79. Gcj anyone is it a JVM or is it not. by Anonymous Coward · · Score: 0

    It does turn java to binary. Real binarys.

    Not bytecode platform dependant binarys. Java in this form is faster than C#.

    Now we need a C# to platform dependant binary and end the problems.

    Fastest code is platform dependant.

    1. Re:Gcj anyone is it a JVM or is it not. by mythz · · Score: 1
      >Not bytecode platform dependant binarys. Java in this form is faster than C#

      .NET has NGen to generate native executable code. C# goes one step further and lets you write better performance 'unsafe' code.

    2. Re:Gcj anyone is it a JVM or is it not. by masklinn · · Score: 1

      GCJ is not a VM, it's a compiler to native code. Kaffe, JamVM or SableVM on the other hand are open-source JVMs. IKVM.Net is also a JVM although a much stranger one since it's a JVM implemented in .Net (I must say that I couldn't, for the life of me, understand the point of doing that...).

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
  80. Implicit Function Template Instantiation by stateofmind · · Score: 1

    No Implicit Function Template Instantiation, useless! :)

  81. java growing old.... by whitroth · · Score: 1

    I've not done java. C for a lot of years, and other things before.

    Lately, while waiting for work, I've been reading the docs for J2EE, and a java textbook.

    Lessee, what I've decided: java is an advertising name. It's real name should actually be Pascal++ (the println's a dead giveaway).

    Oh, and J2EE, and java beans? It's a reimplementation, much messier, and rebuzzworded version... of IBM mainframe CICS (yes, I *have* done that, too).

                  mark "everything old is new again"

    1. 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.

    2. Re:java growing old.... by mythz · · Score: 1

      P.S. Word from actual smart engineers at Google:

      "It was not the most challenging thing I've ever done, but at least I got to do it in Python instead of Java. If you can't have Lisp, Python is the next best thing."

      http://xooglers.blogspot.com/2006/01/lost-in-trans lations.html

    3. Re:java growing old.... by kaffiene · · Score: 1

      Wow!

      ONE engineer at Google likes Python more than Java! I guess that outweighs their entire company's investment in Java. I mean, if ONE engineer doesn't prefer Java over EVERY other language for EVERY task, Java must be like, teh suxor.

      Good argument!

  82. Re:Lisp not accessible by cheesybagel · · Score: 1
    I loved learning LISP. It is wonderfully flexible. However I had some major gripes with it:
    • The syntax, which you can adapt to, given a good editor with auto-indent and syntax highlight.
    • The fact the standard libraries, despite providing a wealth of datastructures, are lame or non-existant for doing anything actually useful (heavy duty I/O, sockets, GUI, etc). Compare this with C, where nothing is standard per ANSI C, but there are libraries which do everything for free bundled in the OS.
    • There is no really good free and multi-platform implementation. For C you have GCC. It works on basically everything you may care about (from ARM PDAs to s390 Mainframes). For Java you have Sun's JDK, which despite not really being open source, is a free (as in beer) download and allows you to develop payware without paying a dime to Sun. The following is a couple years old info, but I am guessing things have not changed much yet: Emacs LISP isn't does not compile into native binaries and is not Common LISP compatible. CLISP does not compile into native binaries and is not 100% Common LISP compatible (almost). CMUCL is buggy, used to have an incredibly lame garbage collector which made you twiddle your thumbs every 5 minutes, and a had poor user interface to boot, GCL is not Common LISP compliant by a longshot. The good tools are payola like Allegro. Contrast this with Sun Java JDK + Eclipse. There is no contest... Even Microsoft is handing out at the moment Visual C# Express for $0 which can be used for commercial use.
  83. There doesn't have to be a trade off by mythz · · Score: 1

    There doesn't have to be a trade off.

    Static typing allows you to catch 'compile-time' errors. The earlier you catch errors in the development cycle, the quicker they are to fix. Also static typed languages generally perform better.

    Where as Dynamic languages like Ruby have the benefits of being quicker to develop as you can can skip the 'compile step' and lets you do more with less code.

    Although there exists languages like Boo (http://boo.codehaus.org/ that lets you have both.

    Advanced features like Type Inferencing lets the compiler 'infer the type' so you don't have to write it each time.

    While built-in support for lists, hashtables, regular expressions, Extension methods, closures and callables (Functions as first class citizens) allows you to write code as terse and easy as Ruby, Javascript and PHP.

    You can run in interactive mode on the fly 'without needing to compile', yet also be able to compile to byte code which gives you the performance benefits of C# and Java.

    Boo also has coding conventions that are actually useful as it allows you to type code that you mean. e.g.

    #Example in Boo
    class Example:
        _privateIntList = [1,2]
        publicStringField = "String"

        [Property(Name)]
        _privateString as string

        def ToString():
            return "Hello, ${_privateString}!"

    examples = [Example(Name:"Foo"),Example(Name:"Bar")]
    examples.Add(Example(Name:"Joe"))

    for example in examples:
            print example

    #Equivalent example in Java
    import java.util.*;

    class Example
    {
        private List _privateIntList;
        public String publicStringField = "String"
        private String _privateString;

        public Example()
        {
            _privateIntList = new ArrayList();
            _privateIntList.Add(1);
            _privateIntList.Add(2);
        }
        public String getName()
        {
            return _privateString;
        }
        public String setName(name)
        {
            _privateString = name;
        }
        public toString()
        {
            return "Hello, " + name + "!";
        }
        public static void Main()
        {
            List examples = new ArrayList;
            Example fooExample = new Example();
            fooExample.setName("Foo");
            Example barExample = new Example();
            barExample.setName("Bar");
            Example joeExample = new Example();
            joeExample.setName("Joe");
            examples.Add(fooExample);
            examples.Add(barExample);
            examples.Add(joeExample);
            for (Example example : examples)
            {
                System.out.println(example);
            }
        }
    }

  84. 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.

    1. Re:java compared to scripting languages? by kaffiene · · Score: 1

      No. It isn't. This doesn't stop Slashbots doing so ad-infinitum.

    2. Re:java compared to scripting languages? by mythz · · Score: 1

      Google seems to think Python is ok: http://www.python.org/Quotes.html

  85. 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

  86. I like Lisp, however... by Nicolay77 · · Score: 1

    Lisp is a wonderful and beautiful language. Common Lisp macros are probably the most powerful language constructs we could ever have.

    However, back in the day it needed more computing power than what was available. 8 whole megabytes of memory for a runtime! A complex program could need 40MB! Outrageous! I remember the first computer in school with 4MB of RAM, dawn expensive.

    So lisp was abandoned, and let to just rust there. Thanks to Paul Graham, everybody turned their eyes to lisp again.

    Time was pretty hard with lisp, and available Common Lisp implementations doesn't have real standards for:
    - Threads
    - GUI
    - C library access
    - Network stuff ... and everything that couldn't be readily implemented in Common Lisp.

    In contrast, if something is implementable directly in Common Lisp, like regular expressions, or aspect oriented programming, it tends to be even faster and more powerful than their counterparts.

    It doesn't mean that there is nothing like a GUI, network libraries and threads in Lisp. The Big and Expensive CommonLisps sure have it. But is non portable between implementations, and TheBigCommonLisps(tm) sometimes ask you for a runtime license fee for every copy you sell of your software. Hey, the greed of commercial lisps is the trauma inflicted in RMS and the underlying cause of the GNU project!

    And the fact that there is no hard dividing line between a DLL and a embedded piece of code in a running lisp image, means that the GPL is probably not a good idea for lisp implementations and libraries.

    So? Well, lisp is good. It surely can be the most powerful language in earth. But Open Common Lisp implementations have to play a little catch up in features and libraries, just about the 15 years everybody forgot about lisp and dreamed of java.

    --
    We are Turing O-Machines. The Oracle is out there.
  87. For those interested by complexmath · · Score: 1

    D has been featured here on slashdot a number of times before. And for anyone who hasn't checked in a while, D has made tremendous progress since it was last reviewed. I think that anyone with use for a systems programming language would do well to look into it.

  88. 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
  89. 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 mythz · · Score: 1

      Agreed I wouldn't say Java is dead in the workplace, it has stood the test of time and is still the clear choice for new Mission critical applications on Unix systems and 3rd party applications on Mobile Phones.

      This is due to the fact that it is a 'nicer C', strong multi-platform support, has strong corporate backing, and great IDE support.

      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.

      Java's key strength is being able to develop stable, high performance, cross-platform applications. These core strengths are being weekened from a number of future challengers.

      Ruby 'on Rails' is on the rise and given time will get more market share. Granted the language is old but its productive frameworks (i.e. Rails, Scaffolding, etc) is New. As the community grows so will its awareness, support and featureset.

      Mono is becoming more complete. The next release of Mono (1.2) will even have compatibility with Windows.Forms. When GTK runs natively on OSX, Mono will have 2 competitive choices for developing cross-platform applications. It is also starting to be installed by default on major Linux Distributions like Suse and Fedora.

      Web 2.0 is becoming a reality, future advances in W3C standards is making the way for a richer user experience. Already Safari, FF 1.5, Konqueror and Opera are readying support for SVG and Canvas (The stuff that OS X dashboard widgets are made from).

      Windows Presentation Foundation (WPF) with the upcoming release of Vista may be the killer app for creating rich applications. It is also mentioned that WPF/E will also run on OS X, giving it more strength.

      Java does have a strong developer market share, Although the reason many of us started with Java was because it was more productive and easier than C/C++.

      However now there exists many other frameworks that are easier and more productive than Java. I tried looking for 'agile languages' that target the JVM (e.g. Jython, Javascript, Groovy) sadly these are dynamic languages for which I don't see any future within Corporate applications.

      For this reason, I have stopped developing in Java for any new 'personal projects' in favour of Mono/C# and Boo.

    2. 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.

    3. Re:Heard it all before.... by mythz · · Score: 1

      Hmmm I wonder why i don't think Java when Im thinking Ajax applications.

      HAVE YOU SEEN Suns own tutorials for whats involved in writing simple ajax applications in Java??
      http://java.sun.com/developer/technicalArticles/J2 EE/AJAX/

      Compare that with a something from Ruby, that does a lot more with a lot less code, configurations and time:
      http://media.rubyonrails.org/video/flickr-rails-aj ax.mov

      Now I wonder why small Web 2.0 companies aren't flocking to Java to power their Web 2.0 apps.

    4. Re:Heard it all before.... by kaffiene · · Score: 1

      Sun Java Studio Creator 2 does Ajax as a click and drag process. That's about as easy as it gets.

  90. Boo = Fast, Statically Typed Python by mythz · · Score: 1

    If you want a language with Python like Beauty, that is statically typed, uses the mono or .NET framework and is as fast as Java then you should check out Boo:

    http://boo.codehaus.org/

  91. Well how about something else? by LordoftheLemmings · · Score: 1

    The answer is quite simple, lua. Powerful language who's best feature is its own lack of bloat.

  92. It's not about the language by Mock · · Score: 1

    The language itself doesn't really matter.

    When it comes down to it, there are two reasons to write code:
    1. For fun.
    2. For money.

    Most people tend towards reason 2, as do I.
    You can be a super wizard at D and be able to write outstanding applications that blow everything else out of the water, but try to get a client to understand why you're using a language that nobody else in the world will be able to maintain for lack of knowledge, and you'll soon be short of a contract.

    You may be the god of Python, but if you're pitching to a .NET house, you'll land like a dead fish.

    There's more than one way to write a program, no matter what language you use, but if you're not following where the mindshare is going, you're taking a huge risk on your career.

    Clients and managers don't want to hear about how language X kicks ass on language Y. They want to hear buzz words. They want to hear how you can synergize your idea with their existing code and knowledge (there exceptions, of course, but I wouldn't bet my future on it!)

    I don't use Java for any love of the language. I use Java because it generates for me a six figure income.

  93. Moving Past Java by Anonymous Coward · · Score: 0

    In a recent interview, Bruce Tate commented "Keep in mind that I'm suggesting Java will be dead like COBOL, not dead like Elvis. For the hardest enterprise problems, Java is safe for at least three to five years--things like sophisticated and scalable object relational mapping, two phased commit, and the like. Java is being threatened in a much more common, and I think important space: how do you build a simple web application that fronts a relational database? Especially a database schema that you control? This industry solves this particular problem over and over, and Java's not very good at it. I think we'll see some significant movement to Ruby on Rails this year."

    http://www.webservicessummit.com/Articles/MovingPa stJava.htm

  94. Ruby + Objective-C + C == :] by JPyObjC+Dude · · Score: 1

    Truly, once GNUStep gets known, building applications using Ruby as the prototype layer (or Python for that matter) you can build some sweet and very high performance applications for desktop and server and embeded systems.

    If Java does not get with the times and start supporting """ identifiers, object and array literals (JSON) and cleaner iterative constructs foreach r in l {, it will get left behind.

    Less lines == improved readability == less scary == maintainable code

    JsD

    1. Re:Ruby + Objective-C + C == :] by mythz · · Score: 1

      Have you seen GNUStep? check out their poster screenshot: http://www.gnustep.org/images/full-screenshot1.png

      Sadly, like the Amiga OS, this will never be get any serious market penetration.

      I agree with Ruby and other agile productive languages like Boo, Iron Python and Groovy. Being able to do more with less code that is terse and seperates the signal from the noise will improve productivity, readability and maintainability.

    2. Re:Ruby + Objective-C + C == :] by JPyObjC+Dude · · Score: 1

      Don't get tricked by the old style UI.

      GNUStep is a highly refined application development environment that works fine for Headless apps on servers. It will take time to get a nicer refined GUI layer.

      Besides, Java Sucks for GUI as well although it does look nicer.

  95. Re:Java API Rot by Leftmoon · · Score: 1

    One thing to keep in mind with List.size(), that method is not limited to Lists (something similar to arrays), but rather any type of Collection. The 'length' of a Set doesn't make much sense, but size tends to.

    It is a little odd at first, but mathematically and logically, I find it appealing: length of a vector and the size of some generic collection.

  96. what are you guys smoking? by freeideas · · Score: 1

    No question that the typical web app can be written 5 times faster with rails, but ruby *replace* java? That's just silly. Would you want to implement a programming language in ruby? Build a 3D animation library? Display vector graphics? Simulate weather? Dude. One of these languages is very high level and one of them is relatively low level. They have very different strengths and weaknesses.

    1. Re:what are you guys smoking? by colinwb · · Score: 0

      But you might want to use Ruby (or something like it) for the main part of your code, and use C for the small part of the code that really needs to be really fast. For example, there is a project by Piet Hut and Jun Makino to develope a model of dense stellar systems as an example of modelling complex physical phenomena.

      The Art of Computer Science: FAQshttp://www.artcompsci.org/rel/faq.html ...

      Why Use Ruby?

      Ruby combines the flexibility of a scripting language with the power of a fully object-oriented programming language. For a large-scale software project, such as the development of the Kali code, it is essential to use data encapsulation, such as offered by C++. However, when developing new code, it is impossible to know beforehand what the best data structures will look like. Rapid prototyping, all but impossible in C++, is equally essential for developing code that is well-thought-out and easy to read, not stuck in a legacy of historical data design decisions.

      Is Ruby Fast Enough?

      No, Ruby by itself is too slow for serious scientific simulations. However, it is straightforward to replace a few time-critical lines of Ruby code with C code, thereby speeding up the original Ruby code to a speed that can approximate that of C code without much trouble. See Vol. 14: Speedup for detailed examples.

  97. It really is true... by Anonymous+Brave+Guy · · Score: 1

    Java really is a bloated beast. Let's take a few specific examples from your post, shall we?

    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.

    That may be, but it still has huge amounts of duplicated functionality in its standard library: it pretty much has two complete GUI frameworks, for a start! Of course you can't remove either without breaking any code. That's what happens when you throw not-so-great stuff straight into a standard library with little consideration for the maintenance issues, and then you have to play catch up. Such problems are ridiculously common in the Java world, and practically define "bloated".

    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.

    And yet, somehow countless properly compiled languages manage neither to preload their entire standard library nor to have extensive start-up times. As you say, it's difficult for Java to win this one, but that's because Java has a fundamental architectural disadvantage. Other languages don't.

    The only real solution to this dichotomy is to make Java an operating system component.

    That's pretty much an admission that Java is "guilty as charged"... Why should any even moderately efficient programming language need OS support just to gain acceptable performance?!

    But really, I'm not sure the library issues are even the major bloat problem in Java. Just take a look at the code. "Hello, world" takes something like four lines of actual code, ignoring punctuation. And before anyone pipes up that you can't compare languages used to develop large-scale applications based on such a trivial example, let me just say: like hell I can't. Everything that's weighing down "hello, world" weighs down the whole language: pointless use of classes, this.that.the.other.do.something(), qualifiers all over the place, etc. Don't even mention the repetitive SomeClass object = new SomeClass() everywhere, even where there's no need to use polymorphism where the types might actually be different for a good reason.

    Compared even to something like C++, Java's syntax is cumbersome and full of unnecessary repetition. Compared to a neat language -- whether your interpretation of that is Python or Haskell or Ruby or whatever -- Java's syntax is almost prehistoric. If it were more powerful to compensate, that would be one thing, but the simpler, more elegant languages are almost universally far more expressive than Java as well. Again, the syntax is bloated, pure and simple.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:It really is true... by xTantrum · · Score: 1
      this.that.the.other.do.something()
      ROTFLMAO. Dude you summed it up nice! this discussion doesn't even need to go on. whereas for example python allows you use OOP technics or not. done. Everyone should be on their last cup of JAVA right about now.
      --
      $action = empty(PHP) ? backToC() : unset(PHP) ; "when the concrete cases are understood, the abstractions are readily
    2. Re:It really is true... by ThePhilips · · Score: 1

      As grand parent have put it: "Compared even to something like C++, Java's syntax is cumbersome and full of unnecessary repetition."

      After several years of experience I have found that over-complex syntax has more or less direct performance implication too.

      As a huge Perl fan & pro, once I have read on how perl optimizes list/map operations. To put it simply, since Perl syntax tends to be short and all list/map operators are part of language itself, Perl optimizer has list of standard optimization patterns for many use cases.

      Compare to Java. (My experience with Java is quite out-dated and Thanks God I'm finished with Java in 1.2/Java2 times.) I needed to implement simple class, analog of grep: one list comes in, two lists comes out. Code to do that took about 20 lines. Compare to Perl's one line with grep or map. It's obvious that Perl has much much greater chance to optimize complex single line operation, rather than Java compiler (how sophisticated it is) tinkering with 20 lines of code.

      I find most of the time people being more ignorant about Java performance, since it is very hard to track were performance was lost and how it can be recovered. Java applications can be fast. But as number of classes and objects grow, absences of decent memory manager becomes obvious obstacle.

      Everything proper has compromise in it. As modern memory-hunger algorithms concerned, Java failed to realize proper compromise.

      Check C++: you write as much code as in Java, but C++ run-time doesn't have to bother with memory management. (And in most applications memory management can be optmized - so in most of the cases there is even no programming problems.)

      Take a look at Python or Perl: you write many time less code as you do in Java, and interpreter run-time (due to Python/Perl rich operator set) doesn't have to guess what code does and better way to optimize it. (In many situations, of course, most optimizations of Perl/Python are specifically targeted at avoiding triggering memory allocation. Memory allocation is always expensive.)

      And now compare to Java: you write quite much code. And Java compiler still has hard time trying to figure out what the code is doing and how to optimize it better. Lose-lose situation. And you cannot avoid triggering memory management. C/C++ you can put object on stack: in Java every object is in fact pointer to object in global memory pool. Lose-lose-lose situation. Developer has to fight both compiler and run-time libraries. Run-time libraries has to be ready for lots of wierdness from a developer - he would try to optimize. Compiler has to be ready for even more weirdness from both run-time library and user code... Like a snowball - the pains grow like snowball with every release of Java. (At least that's my impression.)

      Brrr... Was there for short time. Thanks God not there anymore.

      --
      All hope abandon ye who enter here.
    3. Re:It really is true... by Anonymous Coward · · Score: 0
      To be fair, he's kind of misrepresenting the language. A true OOP-aware designer would know that you should never access the fields directly. Really, it should be:


      this.that().the().other().doSomething()

    4. Re:It really is true... by Anonymous Coward · · Score: 0

      No, that's minor.

      HashMap<String, HashMap<String, HashMap<String, LinkedList<Integer>>>> javaFuckingSucks = new HashMap<String, HashMap<String, HashMap<String, LinkedList<Integer>>>>(16);

      Welcome to modern Java.

      The best part is that, even with all that shit, you don't actually get any speed improvement, and it's still possible to get runtime type failures.

    5. Re:It really is true... by Anonymous+Brave+Guy · · Score: 1

      Blockquoth the AC:

      A true OOP-aware designer would know that you should never access the fields directly. Really, it should be:

      this.that().the().other().doSomething()

      Tell that to everyone who's ever used

      System.out.println("What, no parentheses?\n");

      I suspect the average Java programmer doesn't even know what the types of and relationships between System, out and println are.

      Besides, surely a true OOP-aware designer would assess the relative merits of data hiding vs. simplicity in context, and choose the option that fits best? Much of the time, that will involve indirection for future-proofing, but dogmatically insisting on that has been the cause of more unnecessary code bloat in "OO" projects than just about anything else I've ever encountered (except over-using inheritance, of course).

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  98. Big mistake by youknowmewell · · Score: 1

    You made a common mistake. You made the mistake of correlating popularity to quality.

    Java has been hyped enough that people have been forced to use it by their bosses. This necessitated the creation of many different libraries for different purposes.

    "I want our cellphones to use Java, I've heard Java is good." says the PHB.

    Face it, if quality was the only deciding factor in programming language support then Lisp would already have dominated and wiped out other languages long ago. Java was hyped into star-dom. End of story.

    1. Re:Big mistake by kaffiene · · Score: 1

      You made a common mistake. You made the mistake of correlating popularity with hype.

      Hype may get people's attention, but you don't get the job done for over a decade on hype. Hype doesn't get productivity. Good engineering does.

      Lisp, which you mention, is a fantastic language - one of my favourites. But it suffered from the x-million different versions syndrome. There's many different Common Lisps, then there's Scheme, then there's the different OO frameworks, then there's the different incompatible native library interfaces. Lisp is much better in theory than in practice. In fact, if a large company like Sun had taken ownership over Lisp and enforced the consistency that comes with Java, then yes - it probably would have dominated everything.

      The fragmenting of the (frankly brilliant) language that is Lisp is a great example of why Sun's stewardship of the Java language has been so beneficial to developers and the language as a whole. It's not magic - Java isn't extremely innovative, it's not all wizzy and new. But it works, it's consistent, it ports well and there's fantastic library support. The Lisp story is VERY different.

  99. Freedom is the key! by Anonymous Coward · · Score: 0

    See, I think, you are presenting too much scrutiny and missing an important point. Yes, maybe VS is functionally powerful, but WHO CARES?

    It's not Java vs C# vs Python vs Ruby vs ..... It's about Free Software vs proprietary. Freedom vs slavery. Ethics vs complete absence thereof. Trust vs antitrust. (I hope you realize why I use the capital 'f' in Free).

    1. Re:Freedom is the key! by blaster151 · · Score: 1

      There are also ethics involved in earning one's paycheck in a competent and productive manner. If one development environment is orders of magnitude more efficient than another, I owe it to my employer to balance my idealism about free software with the pragmatism to choose the right tools to help me deliver the value for which I'm being paid. I don't consider my dependence on Microsoft tools as slavery; their relative reliability and testedness liberate me from spending my time trying to figure out how to tweak the configuration options in some open source environment to get things working AT ALL. Open source languages and standards may rival those of proprietary companies, but the tool support is just not there yet, IMHO.

    2. Re:Freedom is the key! by Anonymous Coward · · Score: 0

      ] I don't consider my dependence on Microsoft tools as slavery...

      Trust me, when the BSA comes with their audit, you *will*. Moreover, you will be looking at Linux greedily.
      You will feel just as bad when MS doubles, triples, and quadruples the licensing fee on you at their tiniest
      whim or because they just happened to dislike the company you are working for.

  100. Alternative idea. by zymano · · Score: 1

    Allow the user to decide how they want java to work might be a good idea.

    I personally don't need java to compile anything. It's pure unnecessary overhead for a game or a website. I don't need high speed computations. Python or Ruby speed is acceptable. For a scientist that needs it , I would understand.

    Java should be able to start and work immediately like Python and Ruby . Java implementation was faster perception-wise in previous releases. It's trying to do to much for too many people.

    1. Re:Alternative idea. by Anonymous Coward · · Score: 0

      Run with "-Xint" and Java won't bother compiling anything.

  101. Java, More than Sun Microsystems by FoxyFox · · Score: 1

    Java is still growing. The only competitor is .Net, which eventually will take more market shares, but probably never will outgun Java. Like in the MS-world, Java's biggest competitor is the prior version. Keep in mind that C and C++ are still the most used languages in their environments. (Parallel computing, OS etc.)

  102. Correction: Ruby's BNF has only 39 productions by mclaincausey · · Score: 1

    SSIA

    --
    (%i1) factor(777353);
    (%o1) 777353
  103. Smalltalk and Squeak by mzimmerm · · Score: 1


    It is about fashion. Count "Ruby" in replies, > 100. Count "Smalltalk" ~ 5. A cleaner language with better library is talked about so much less ....


    try Squeak Smalltalk
    try 3D Croquet

    1. Re:Smalltalk and Squeak by Anonymous Coward · · Score: 0

      ruby is quite nice too, mind you. I love smalltalk, and when I'm doing something small I'm usually working in Ruby... it's like smalltalk, with vim. Squeak and (in my case mostly) VisualWorks are a bit too big for small thingies.
      I simply love pure OO languages that are dynamically typed and know blocks :)

  104. Tim Sweeney's View of Programming Languages by Chuan-kai+Lin · · Score: 1

    At the POPL 2006 (Symposium on Principles of Programming Languages, an academic conference) last month, Tim Sweeney (of Epic Games and Unreal Engine fame) gave an invited talk on the future of programming languages. You can read his slides online.

    It is worth noting that he seems to think that static types, particularly an expressive dependent type system, is the way to go for the future of game development.

  105. Re:Lisp not accessible by Anonymous Coward · · Score: 0

    This has nothing to do with trying something new or not being open to certain programming languages. Perl, Python, Prolog, Haskell and C++ each have there benefits. The Lisp parenthesis syntax has no benefits other than arcane insanity and a simularity to Grok and Ork tongue. Molbolge and Befunge are better than Lisp. A Pan Galactic Gargo Blaster would feel better than Lisp because although your smashing your head between two lemon peals with a sledge hammer at least it gives you a good buzz.


    Lisp needs a more modern control structure not something that is 30 years old. Parenthesis notation is for the birds. A modern list oriented language would look more like C with list processing not RPN Algebra and that is why Lisp hasn't caught on. Lisp has a Lisp and is one of the few languages that has a defective vocabulary. All the Lisps including Scheme ect. need a modern structured approach. Just because it is list processing doesn't mean it needs parenthesis. Come up with a better structure at least.


    This is some Lisp Code:


    (null (= 1 (* 2 3)))


    (and 1 (cons 'c '(b)) (rest '(c)) (setf y 'ThislanguageSucks))


    This would be a C version of lisp. It shows that Lisp in it's present form sucks. Not to mention that some versions of lisp don't have for loops.


    list x, y, z, u;

    display(x.size);
    x.add("a", "b", "c");
    z.add("a", "e", "qsdlfjks");
    display(x.first);
    if(cmp(x.first, y.first)) display("true");
    u = first(x.rest + z.last + y.middle);

    Each of the Languages except Lisp has some advantage to go with it's paradigm. With Python the tabbed spacing at least makes things more readable. With Perl the complexity gives lots of power and with C++ it gives some additional features beyond pure C. Haskell and Prolog also give some benefits concerning logic and functional programming. But Lisp has severe issues with it's parenthesis programming structure that hampers it from becoming more mainstream.

  106. Re:Author: cheerleader for Ruby but has good point by synthespian · · Score: 1

    Ruby has made some important OO design contributions

    It has ?! Like what ?! What's in Ruby that wasn't in other languages ?!!

    For patience's sake, this is the problem...All I see are ideas that were in other languages, thrown together in a learn-as-you-go experiment. People think continuations are cool? Then look at Scheme and look at Smalltalk. You can't compare years of development to that experiment. Ruby is rubbish. Compare it to any Smalltalk implementation. Download a Common Lisp IDE (LispWorks, Franz) and tell me how cool Ruby is...When people diss Java, remember to also diss HotSpot. Can your little language optimize code statistically like that? I thought not...

    You want new stuff? Look at Factor, Joy, the Mozart/Oz system, or Slate.
    Wanna compile at gcc performance? Try Scheme with the Bigloo implementation, or Objective Caml. Bechmarks for Ocaml here (and for SML with MLTon compiler here.- The bechmarks for Bigloo were reomved some time ago).

    I'll just post the buzzwords for Factor:

    Continuations, exception handling.
    Powerful and logical meta-programming facilities. Introspection, code generation and extension of both syntax and semantics is very easy.
    Higher-order programming allows code blocks to be treated as data and used as parameters.
    Highly minimalist, very consistent design. No layers upon layers of indirection, no confusing corner-cases, no poorly-thought-out features.
    Postfix syntax with an extensible parser; values are passed on the stack.
    Higher-order programming allows code blocks to be treated as data and used as parameters.
    A powerful and very generic collections library allows many algorithms to be expressed in terms of bulk operations without micro-management of elements, recursion, or loops.
    A very consistent object model based on generic predicate dispatch.
    Arithmetic operations that closely model mathematical concepts, rather than just being a thin abstraction over underlying machine arithmetic. All integer operations are done in arbitrary precision, and exact fractions are supported. Complex numbers and complex-valued elementary functions are integrated.

    Damn, that Slava Pestov is one smart dude.

    When you see those languages, you kinda get sad that Ruby is such an attention-grabber, but I can see clearly that this is just because of disinformation. With the exception of Joy and Slate (for now, I hope), all the others I cited have pretty workable environments.

    And by the way, you don't write LISP anymore, it's Lisp.

    --
    Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
  107. Re:Dynamic typing in Smalltalk by Anonymous Coward · · Score: 0

    That above comment was quite inciteful!

    For those who haven't programming in a dynamic language such as Smalltalk: Dynamic type doesn't equal no type. Nor does it mean non-declared variables

    for example in Smalltalk:
    |ar | "Mandatory declaration of ar"
    ar := Array new: 10. "creates new Array with 10 nil entries"
    ar at: 1 put: 20. "puts 20 at position 1"

    ar then has class of Array.

    This can be verified by displaying:
    ar class will return Array

    Running in a debugger will also verify it.
    Later could do:
    ar := 'Hello World'.
    ar class will return String.
    (The array would be garbage collected if nothing else pointed to it.

    And with languages as dynamic as Smalltalk or Ruby you can also add methods to any class. Even add to Array and String.
    You can even add them at runtime if you are so inclined. (personally never had to do it).

    Want to re-define a loop? Go ahead it isn't a fundamental keyword a'la C like for ( ; ;) { }
    Want to stuff different types into a collection? Go ahead, as long as particular function you want to traverse collection with is supported.

    The other critical component of using a dynamic language, as has been pointed out, is unit testing. For example, I can run a test on all methods starting with 'test'. Like 'testString'. Just add method and it will be added to test suite. And will check as many diabolical edge cases as you like. Pick your level of paranoia: Run test suite every day, every hour, or every time you commit a method.

    Unit tests let you take bigger risks. The reason codebases stagnate is not due to fear of creating bugs: every developer does it. The better ones probably create more. The reason is fear of NOT KNOWING if you created a bug. That is why unit testing encourages experimentation and ultimately better code. Static type checking simply 'falls out' of unit testing, but it is a minor win compared to the edge case exercising of each method that has unit test coverage. That is the major win.

    If interested, you might tryout the Community Edition of Dolphin Smalltalk.
    http://www.object-arts.com/content/mydolphin/d6Dow nloads.html

    For windows environment it it hard to find a more comfortable environment. And you will find it is quite fast execution speed as well. They do a lot of clever optimizations (without breaking simple language) to get good speed.

    Other languages:
    Personally I like a lot about Ruby (especially current popularity), but Smalltalk syntax is way cleaner. I worry the reported execution speed of Ruby apps will prejudice folks against dynamic languages.

    "IO" is by far the cleanest language syntax of anything I seen, just fairly new at this point. If it had kept the self-documenting keyword: key method: met syntax: syn of smalltalk, it would be that much cooler.

    Of course ObjectiveC might be the cleverest compromise ever: Ansi C plus embedded smalltalk like coding... I believe this is a key reason Apple appears to be more nimble than MS.

    And going yet further out on this unsupported limb (it goes without saying someone will shoot me down). Google does quite a bit with Python. I think that being a good dynamic language is a strength and allows them to market quickly with new ideas. However, Python is not AS dynamic as Ruby or Smalltalk (weaker reflection I understand). And in some tiny way, I think this has made it harder for Google to really hone their projects. To me at least Google does a really nice job on initial release of a product (gmail, maps, picasa) but then kind of doesn't fill in some obvious missing functionality. (like saving thumbtacks or waypoints on maps for example). Kind of 1/2 baked theory I suppose.

    Actually if you look at history of programming languages after smalltalk, they are ALL re-converging toward Smalltal

  108. Ohh... by slack_prad · · Score: 0

    I am just starting out with Java now (I've been forced to) and I really like Python! Damn the 'hype'rs !!

    --
    Sent from my desktop computer
  109. Save $0.99 by buying the book here! by Anonymous Coward · · Score: 0

    Save yourself $0.99 by buying the book here: Beyond Java. And if you use the "secret" A9.com Instant Reward discount, you can save an extra 1.57%! That's a total savings of $1.25, or 7.24%!

  110. Boo Version by mythz · · Score: 1

    Boo Version:

    print "Hello World!"

    How about a comparison of Code that does a little more?

    import System

    April1st = DateTime(DateTime.Now.Year,4,1)
    CountDown = April1st - DateTime.Now
    print "There are ${CountDown.Days} days left for a release of Java that is productive!"

    Java version Anyone?

    1. Re:Boo Version by Malc · · Score: 1

      I haven't written Java for years, but I seem to recall it would be very similar with its Date object.

  111. I read the book by aCapitalist · · Score: 1

    Sat down at the local Borders and read it in about an hour after it caused a big stink over at javalobby.org and theserverside.com a couple months ago. Ruby's a real nice language and I'd personally choose it over Java for many projects, but it's just falling into it's niche with the Ruby on Rails hype, just like PHP, Perl, and Python fell into their niches a while back.

    The thing is that a pure dynamically typed language is never going to be the language "Beyond Java". But it doesn't have to be an either/or situation, as is already the case with languages like Boo and Dylan. Look at languages that do type inference with type declarations for method arguments and return types as "the future". Take a look at http://lambda-the-ultimate.org/node/1253 for what Microsoft is doing with the next version of C#. That seems to be a more reasonable approach to the whole dynamic vs static typing debate. In fact, I would recommend searching http://lambda-the-ultimate.org/ to see what some of the "deep thinkers" about these issues say about the whole debate.

    Ruby is nice, but Beyond Java seems more of a book to shake up the Java community and promote consulting services than any real insight onto what's "Beyond Java". I think Guido is even going to be pure some sort of type declarations in Python 3000 - whenever that comes out.

  112. Re:Lisp not accessible by Scarblac · · Score: 1

    Nice troll.

    Lisp has macros. They're extremely powerful, and one of the most important features of the language, and as far as I know not available in any other. And they would hardly be possible with a C like syntax.

    --
    I believe posters are recognized by their sig. So I made one.
  113. Important points for a programming language by Thomas+Mertes · · Score: 1

    There are several points I consider important for a programming language

    - Available under various operating systems.
    - Operating system independend (no access to proprietary functions).
    - An open source implementation of the compiler/interpreter + librarys.
    - Usable to write applications and skripts (Not only an internet language).
    - Possibility of compilation (some optimizations are not possible just in time).
    - Typesafety for containers, etc. (the compiler can find typing errors)
    - Object oriented but simple types should also be there.
    - Possibility for extension (new Datatypes, Functions, Operators, Statements).
    - For simple problems simple programs should be the solution.
    - Take load from the shoulders of programmers.

    Because I am biased, I do not suggest a successor for Java

    Greetings Thomas Mertes

    Seed7 Homepage: http://seed7.sourceforge.net/
    Wikipedia: http://en.wikipedia.org/wiki/Seed7
    Project page: http://sourceforge.net/projects/seed7

  114. Source Code by Zobeid · · Score: 1

    Performance might sometimes be a concern, depending on the nature of the app. Probably a bigger problem with any interpreted language is security. Maybe, just maybe, I don't want everybody out there picking over my source code and making changes to the program. I don't know if Ruby or Python have any way to tokenize or obfuscate source code -- but with a compiled language, it's clearly not something I need to worry about.

  115. Huh?! The future is Ruby, Python and Smalltalk? by bobzieruncle · · Score: 1

    The future is multiparadigm programming.
    This book was an eye-opener for me.

  116. 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

  117. Thank You! by ardle · · Score: 1

    I read a quote somewhere: "Technology is something that isn't finished yet". These frameworks are bloating because people aren't creating the correct kinds of tools; their developers haven't yet identified what they want the frameworks to do, or else they're just solving the wrong problems. Hopefully, this bloat won't lead to Java being abandoned in favour of the next half-baked set of ideas. Java is simple to work with and its object model is easily applied to real-world problems (i.e. whatever you want your program to represent, bar interfaces with external systems, including end users). I firmly believe that once the corrrect objects/interfaces are defined in "problem" areas (such as User Interfaces - or "presentation layer" as some might call it), then programming as a whole will benefit. This is where "patterns" are leading us. Some will fall by the wayside, just like some frameworks.

    Hibernate looks pretty cool.

    I like the look of Echo 2, will be looking at it again...

  118. Forgot to mention AOP... by ardle · · Score: 1

    ... and Spring. Hear people are raving about it, saying that it's saving them days' worth of meaningless coding ...