Linked by David Adams on Mon 26th Jul 2010 00:57 UTC
General Development Today's commercial-grade programming languages - C++ and Java, in particular - are way too complex and not adequately suited for today's computing environments, Google distinguished engineer Rob Pike argued in a talk at the O'Reilly Open Source Conference. Pike made his case against such "industrial programming languages" during his keynote at the conference in Portland, Oregon.
Thread beginning with comment 434460
To view parent comment, click here.
To read all comments associated with this story, please click here.
Member since:

And what about Java is so necessary. I often find that type safety can be a hindrance causing me to have to write several pieces of similar code or code that is convoluted with extra syntax just to express objects that are obviously similar but don't fit in to an obvious object hierarchy. I often find myself overriding methods for several default values and or types which results in several methods calling other similar methods, in a dynamic language I often reduce half a dozen overridden methods into a single method that shows all the default values in one declaration. The reflection libraries and creating dynamic methods or inner classes in Java is plain ugly compared to languages like Python or Ruby. The rigidity of languages like Java has it's place and it can be useful in some scenarios. But there is a lot of places that it just becomes extra syntax that really doesn't make the code any clearer. In fact there are a lot of cases where you end up writing hundreds of lines of boiler plate code that becomes completely unnecessary when you remove the necessity of explicit typing, Templates (or Generics if you prefer) and method overriding create hundreds of lines of extra code.

Dynamic languages allow you to choose when the best time to use a feature is. If type safety is so important in a specific scenario you can type check. The fact is dynamic languages tend to let a designer have more freedom to chose the right path based on the scenario as opposed to taking the same route regardless of whether there is a better way. For the most part if I can do in 100 lines of code what takes 500 lines in another language the 100 lines of code is likely to be easier to follow and have less errors than the 500 lines.

There is nothing inherently wrong with dynamically typed languages. And the assertion that if you want to build real software you need Java or C++ has been proved incorrect time and time again.

Twitter is one of the fastest growing and highly utilized systems in the world right now, it's written in Ruby. Checkout Plone/Zope, a CMS written in Python that has been used in thousands of websites including some real heavyweight systems like Akamai, NOvell and Nokias web sites. Or maybe you could checkout Django which is used to develop several high traffic news sites. And Wordpress, RoR, Pylons/Turbogears, and probably dozens of other frameworks provide robust, well designed, tested systems that allow you to quickly and effectively build enterprise class software.

I'm not saying that in certain situations where performance is absolutely key or when integrating with some other software or company policy that Java, C++ or C# are better alternatives. But there is certainly a place for dynamic languages. They are not toys and just like Java if you follow good design and testing principles you will be able to construct an enterprise ready system with them. And sometimes, in fact more often than not, you can save time and have cleaner code when you can choose how to use the language you're using rather than have something like type safety imposed upon you as a developer.

A bad developer can shoot himself in the foot regardless of the language or the framework he/she is using. It may be that dynamic languages provide bigger guns that can be used to shoot off your whole foot more easily. But it all comes down to the developer/designer and their ability with the tools they have to use.

Reply Parent Score: 2

arbour42 Member since:

Twitter is one of the fastest growing and highly utilized systems in the world right now, it's written in Ruby.

This is incorrect. Twitter was initially written in Rails, but the performance was dismal and it wouldn't scale; plus they basically had to implement an entire type checking system in the test suite.

So they switched the entire back end to Scala, the JVM-type-safe functional language. That saved them. You can read about it here:

a quote from this article:

Another thing we really like about Scala is static typing that’s not painful. Sometimes it would be really nice in Ruby to say things like, here’s an optional type annotation. This is the type we really expect to see here. And we find that really useful in Scala, to be able to specify the type information.

As our system has grown, a lot of the logic in our Ruby system sort of replicates a type system, either in our unit tests or as validations on models. I think it may just be a property of large systems in dynamic languages, that eventually you end up rewriting your own type system, and you sort of do it badly. You’re checking for null values all over the place. There’s lots of calls to Ruby’s kind_of? method, which asks, “Is this a kind of User object? Because that’s what we’re expecting. If we don’t get that, this is going to explode.” It is a shame to have to write all that when there is a solution that has existed in the world of programming languages for decades now.

Reply Parent Score: 2