The Artima Developer Community
Sponsored Link

Java Community News
Bill Burke on Dynamic Language Myths and Rationalizations

19 replies on 2 pages. Most recent reply: Feb 28, 2008 9:00 PM by Diego Fernandez

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 19 replies on 2 pages [ 1 2 | » ]
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 18, 2008 3:37 AM
Reply to this message Reply
Summary
JBoss' Bill Burke discusses some frequent myths and rationalizations about dynamic languages, and shares his requirements for a language that would make him switch from Java.
Advertisement

JBoss' Bill Burke contributes to the discussion about post-Java languages, dynamic and static typing, and programmer productivity in Dynamic Languages: Rationalizations and Myths.

Burke starts out by noting his openness to languages other than Java, and even to dynamically-typed languages:

I do wish that a statically typed dynamic language would come of age, but until then, I’ll stick with Java. Really, I don’t know why somebody hasn’t done it it. Is static typing really that hard to implement well? For example, why not gut Groovy and have Dynamic Java? Or do the same with Scala? Or add static typing to Python and get Jython up-to-date...?

While I don’t believe that Java is the one language to RULE THEM ALL, I do believe it is vastly superior to anything out there to build applications with...

I also do not believe that Java is the end all, be all of existence. It still needs elegant, typesafe closures to complement annotations as a way to implement DSL. It needs a standard, non-code generating way of adding behavior to annotations. It needs a structural syntax to make initialization easier. AOP support might be nice too, or at least JVM support to make it easier to implement AOP-like features. Better zero-turnaround development features in both the JVM and APIs like Java EE, Seam, Hibernate, Spring, and JBoss AS would help out tremendously as well.

Burke, primary author of JBoss' Java EE application server, details many of what he believes are myths and rationalizations about dynamic languages, and backs up his claims from his own experience:

  • Dynamic Language XXXX didn’t do well against Java in XXXX benchmark
  • Ruby VM cannot support kernel threads
  • Dynamic languages like Ruby, Python, etc… are not typesafe/statically typed
  • Lack of type safety doesn’t scale well to large teams
  • Lack of static typing does not allow for reliable refactoring in modern IDEs
  • Software Engineers should use the best language for the job
  • More lines of code means more bugs, thus dynamic languages are better.
  • I am more productive in XXX dynamic language because the syntax is cleaner, more elegant, and more powerful.

One of Burke's main points is that modern IDEs for statically typed languages support reliable refactorings that make up in productivity for the verbosity of languages such as Java:

I was a VI/Emacs user up until 2002 when Intellij came out with refactoring capabilities. Up until then, I was as productive with emacs, find, grep, and sed as I could be with any IDE out there. After finally becoming familiar with IntelliJ and its refactoring capabilities, I found that I was 5, 10 times more productive with my IDE than I was before. Now, Ruby fanboys will argue, “Intellij and Netbeans have refactoring capabilities for Ruby!” My answer is, it is not reliable refactoring.

What do you think of Burke's points about refactoring IDEs versus language conciseness in making programmers productive?


Daniel Berger

Posts: 1383
Nickname: djberg96
Registered: Sep, 2004

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 18, 2008 5:25 AM
Reply to this message Reply
What do I think? I think you should stop linking to people like Bill Burke.

Eivind Eklund

Posts: 49
Nickname: eeklund2
Registered: Jan, 2006

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 18, 2008 7:33 AM
Reply to this message Reply
I think Bill Burke has missed the point about verboseness being in the way of READING code, and that he's become overhappy about automatic refactorings *without having programmed with and without automatic refactorings in parallel*.

Michael Hobbs

Posts: 51
Nickname: hobb0001
Registered: Dec, 2004

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 18, 2008 9:09 AM
Reply to this message Reply
He seems to require static typing only because it allows reliable refactoring by an IDE. Though, in my mind, an IDE could possibly refactor decently without static typing. It's just that static typing makes the job much easier.

The problem for the IDE is that with OO languages, namespaces (class instances) can be passed around at runtime as first-class objects. When you want to rename a variable or function in a particular namespace, the IDE has to figure out all of the different locations in code that refer to that variable in that namespace, without misidentifying a variable with the same name, but in a different namespace.

Static typing makes that job much easier, since it explicitly identifies which namespace (class) a variable is going to use. Though there are still loopholes, such as reflection, that allow the IDE to miss.

For a non-statically-typed language, you can perform almost as good a job with data-flow analysis, but that is a much harder problem to solve. It is also not without its loopholes. If you have a function that operates on serialized objects that come in via I/O, there is no way the IDE will know whether that object's namespace is the same as the one you're trying to modify.

Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 18, 2008 9:38 AM
Reply to this message Reply
I think you should have noticed it was filed under flame bait.

Kay Schluehr

Posts: 302
Nickname: schluehk
Registered: Jan, 2005

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 18, 2008 11:07 AM
Reply to this message Reply
Anything new here that hasn't been discussed a million times before without any result? Programming related blogs become increasingly boring, redundant, uninspired...

Michael Feathers

Posts: 448
Nickname: mfeathers
Registered: Jul, 2003

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 18, 2008 11:13 AM
Reply to this message Reply
He lost me when he said "I do wish that a statically typed dynamic language would come of age.."

:-)

Merriodoc Brandybuck

Posts: 225
Nickname: brandybuck
Registered: Mar, 2003

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 18, 2008 7:07 PM
Reply to this message Reply
I wonder, given how keen he is on refactoring tools, if he knows the first refactoring tool was built in smalltalk, a dynamic language.

And I don't think he would last a week in the game industry. Those folks regularly use two to several languages.

Heck, I've been doing enterprise apps for most of my career and have had need of C++, C# and VB (several flavors) all for one project because of different requirements for different pieces. I didn't find it to be anywhere close to a nightmare. More of a nightmare would have been writing dynamic web content in C++, I think. Even if I were to use something like Ch.

There are certain things I can do in python that I just can't easily do in other more static languages. Maybe it is simply because nobody has written the libraries yet. Just today I cranked something out pretty quickly in python that I needed done that would have taken me, I estimate, 3 times as long to do in C#.

The other thing that is nice about dynamic languages, for me, anyway, is that they usually get you thinking about a problem differently. I miss things like list comprehensions and the set data type that python has when I'm in a different language environment. Coroutines in scheme, if you need them, aren't as clean, in my opinion, in other languages. Hell if you are in a microsoft world it is still hard to beat some flavor of visual basic for quickly gluing together COM components to talk to a database and do something useful. No amount of IDE coolness can replace those.

Bill works on JBoss and likes Java and that is fine. It would appear it is what he knows and likes to do, which is also fine. As Kay said, this has been discussed a million times before and that particular rant doesn't bring anything new to the party, is incorrect in some places, and despite claims to the contrary, shows some pretty strong biases.

Sounds like he should take a look at F# or ML.

I also find it slightly amusing that, in one way or another, we are all ranting about a rant.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 19, 2008 9:24 AM
Reply to this message Reply
> He lost me when he said "I do wish that a statically typed
> dynamic language would come of age.."

Seriously, though, what does that mean (if anything)?

Michael Feathers

Posts: 448
Nickname: mfeathers
Registered: Jul, 2003

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 19, 2008 9:29 AM
Reply to this message Reply
> > He lost me when he said "I do wish that a statically
> typed
> > dynamic language would come of age.."
>
> Seriously, though, what does that mean (if anything)?

That's exactly why he lost me. It doesn't mean a thing unless he has a wildly different notion of static and dynamic typing.

Merriodoc Brandybuck

Posts: 225
Nickname: brandybuck
Registered: Mar, 2003

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 19, 2008 10:06 AM
Reply to this message Reply
> > > He lost me when he said "I do wish that a statically
> > typed
> > > dynamic language would come of age.."
> >
> > Seriously, though, what does that mean (if anything)?
>
> That's exactly why he lost me. It doesn't mean a thing
> unless he has a wildly different notion of static and
> dynamic typing.

I would guess he wants something with a decent type inference mechanism. But then you are talking about a strongly typed dynamic language, where type matters but does not need to be explicitly declared.

Anyway, reading the comments was kind of enlightening, which is why I said he had definite biases. Along the way somebody had mentioned that the first refactoring tool was done in smalltalk and the response was

"Smalltalk may have been first, but Intellij dudes were the ones to finally bring refactoring to a statically typed language. Thank you JetBrains. You guys rock!"

And yet one of the main bolded points is "Lack of static typing does not allow for reliable refactoring in modern IDEs".

So, if I understand correctly, you can't have refactoring tools without static typing, but the first good refactoring tool was done in a dynamic language. But that's not allowed. I'm confused.

Re-skimming the post makes me feel like I'm reading the blog equivalent of swamp castle. http://www.mwscomp.com/movies/grail/grail-14.htm

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 19, 2008 11:02 AM
Reply to this message Reply
> > > > He lost me when he said "I do wish that a
> statically
> > > typed
> > > > dynamic language would come of age.."
> > >
> > > Seriously, though, what does that mean (if anything)?
> >
> > That's exactly why he lost me. It doesn't mean a thing
> > unless he has a wildly different notion of static and
> > dynamic typing.
>
> I would guess he wants something with a decent type
> inference mechanism. But then you are talking about a
> strongly typed dynamic language, where type matters but
> does not need to be explicitly declared.

Type inference would only be meaningful in a staticly-typed language, right? How would type-inference be used in a dynamic language? If you don't declare the types, what's to infer? Or in other words, what would the type be checked against?

It seems to me that in this context dynamic and static are opposites. Maybe I'm missing something.

> Anyway, reading the comments was kind of enlightening,
> which is why I said he had definite biases.

I also believe that he is biased.

> And yet one of the main bolded points is "Lack of static
> typing does not allow for reliable refactoring in modern
> IDEs".
>
> So, if I understand correctly, you can't have refactoring
> tools without static typing, but the first good
> refactoring tool was done in a dynamic language. But
> that's not allowed. I'm confused.

I think what he's saying is that what a refactoring tool can do in a statically typed language is more than what a refactoring tool can do in a dynamic language. As far as I have been able to gather, this is true. However, he probably underestimates what refactoring tools can do in a dynamic language and ignores that Java's reflection makes it subject to those same limitations.

Merriodoc Brandybuck

Posts: 225
Nickname: brandybuck
Registered: Mar, 2003

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 19, 2008 12:50 PM
Reply to this message Reply
> > > > > He lost me when he said "I do wish that a
> > statically
> > > > typed
> > > > > dynamic language would come of age.."
> > > >
> > > > Seriously, though, what does that mean (if
> anything)?
> > >
> > > That's exactly why he lost me. It doesn't mean a
> thing
> > > unless he has a wildly different notion of static and
> > > dynamic typing.
> >
> > I would guess he wants something with a decent type
> > inference mechanism. But then you are talking about a
> > strongly typed dynamic language, where type matters but
> > does not need to be explicitly declared.
>
> Type inference would only be meaningful in a
> staticly-typed language, right? How would type-inference
> be used in a dynamic language? If you don't declare the
> types, what's to infer? Or in other words, what would the
> type be checked against?
>
> It seems to me that in this context dynamic and static are
> opposites. Maybe I'm missing something.
>

I don't think you are. I was just taking a stab at what I think he may have meant. A slippery slope I know, especially when talking about types because I think that is becoming a rather slippery slope, anyway. He asks for a statically typed dynamic language.

This file, though rather large, has a pretty good over view of static and dynamic languages, strong and weak typing, and where the two tend to meet and diverge http://www.computer.org/portal/cms_docs_computer/computer/homepage/Feb07/COM_012-015.pdf

Also, here is an artima weblog that also has some good references http://www.artima.com/weblogs/viewpost.jsp?thread=7590

What I'm trying to say is, I think he meant to say strongly typed dynamic language. There are plenty of languages where you don't declare the type explicitly and the language's runtime has a type inference engine to figure out what is what.

A big part of the problem with these discussions is that not everybody even agrees on what makes a language static or dynamic. Type systems, I think, are pretty well understood, but what makes a language dynamic or not? The type system is part of, but not, the entire picture.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 19, 2008 1:47 PM
Reply to this message Reply
> What I'm trying to say is, I think he meant to say
> strongly typed dynamic language. There are plenty of
> languages where you don't declare the type explicitly and
> the language's runtime has a type inference engine to
> figure out what is what.

The main thing he's looking for (from what I can tell) is static analysis for refactoring support. I'm not sure the above would provide this.

Personally, I think that it would be pretty difficult to make a language statically typed without eliminating some of the most useful features of dynamic languages.

I also see the value in static typing but I think it's possible that static languages create some of the refactoring needs that they make possible. It's kind of like the arguments for WS* over REST that I read and hear: WSDL allows for code generation. But the thing is that the main reason for needing the code generation is to deal with the complexities of the standards supported by it.

This isn't to say that there isn't a value. I think there is but I think it's easy to get stuck in a static view when judging dynamic languages and vice versa.

Alan Keefer

Posts: 29
Nickname: akeefer
Registered: Feb, 2007

Re: Bill Burke on Dynamic Language Myths and Rationalizations Posted: Feb 19, 2008 2:39 PM
Reply to this message Reply
I agree that the comment about wishing for a statically typed dynamic language seems a bit contradictory. The "dynamic" tag applies not only to typing but also to the development cycle, where people think of interpreted languages that don't require re-compilation or re-deployment as "dynamic" irrespective of how the type system works (though they do often go together).

With that said, my company does have an internally-developed scripting language that runs on top of the JVM (and can thus interact with Java) that is kind of a hybrid of static and dynamic typing; it's statically typed but the typesystem is essentially pluggable. So basically you can easily extend the typesystem to add new types to the system, and you can make changes to the type system and then refresh it on the fly. Of course, for static typing to work that means the types have to be defined at compile time, but compilation is always done dynamically at runtime from source, which means that as long as the type system is initialized before you attempt to reference a type you can still statically type everything while retaining some of the advantages of dynamic typing. Granted, it's not as dynamic as something like Ruby or Lisp where it's easy to programatically shove methods and classes into the system at any point during program execution, but that lack of restrictions is precisely why IDEs and refactoring tools can't deal reliably with them.

And I should add that naturally we do have type inference in there, which is also a big help in reducing the drag caused by static typing.

Flat View: This topic has 19 replies on 2 pages [ 1  2 | » ]
Topic: Phil Costa on Adobe's Integrated Runtime 1.0 Previous Topic   Next Topic Topic: Yahoo Releases YUI 2.5

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use