I work with Misko (well, at a distance - he interviewed me) and I
often agree with him. Having said that... he's comparing things
inappropriately. The boilerplate code required in Java isn't due to
it being a strongly typed langauge - it's because certain common
patterns of use that can be automated by tools (generating accessors)
aren't handled by the language itself, and other things that a
compiler could do (type inference, etc) aren't done.
Scala does some of these things, as was pointed out below, but is a
little inconsistent in style (feels like a franken-language a bit,
though it's very powerful and nice in a lot of ways). But again -
strongly typed.
In the end, dynamically typed languages are really fast for rapid
prototyping when compared with the statically typed languages that are
in common use - but this is quite aside the point.
Christian.
P.S. Stylistically, Misko does have a tendency to jump ahead and run
with a concept and over-sell it. He's smart - razor smart, and I
admire him greatly. But sometimes he's a bit too convinced of his
view a bit too early. -cg.
On Apr 23, 2010, at 3:26 PM, twitter.com/nfma wrote:
I agree with Misko 100%.
I have yet to meet someone that wrote an app in a dynamic language
using TDD that didn't have the same kind of experience that Misko had.
Everyone seems to be frustrated when going back to Java with the
verbosity of the language, lack of high level constructs and the
broken generics.
To my knowledge Scala and Haskell have a proper type systems that
really saves your fingers but unfortunately Java doesn't...
Nuno
On 23 April 2010 21:02, Alexey Zinger <[email protected]> wrote:
As was briefly mentioned, let's keep in mind distinction between
dynamic and weak typing. I looked at the link in your post and some
things jumped out at me that I just had to respond to (I realize the
bog post is not yours personally):
> If you can’t understand it, just rewrite it, after all its just
couple of hundred lines, how long can it take you?
Whaaaaaat? That's his answer to the problem of understanding
loosely typed, dense code? Sure, it's possible to make an
impenetrable mess using any language, dynamically typed or not, but
usually when I'm having a hard time with something written in Java,
it's either because the code is laid out in such a way that it
undermines basic OOP principles, including loosening type
restrictions, where it shouldn't, or there's some non-trivial flow
of control lacking in documentation. The latter, such as
asynchronous calls, is not easy to deal with in any language at this
time, but documentation is usually the answer.
> Code Density in dynamic languages are phenomenal! All of the
endless casting, coercing and repetition in declaration simply is
not there resulting in very dense code.
I smell pure FUD. Even without reified generics, Java hasn't had
the need for much of casting in how long now? Especially if you're
doing web development and not using Swing, which lacks generified API.
> I can see how a dynamic language can be a nightmare if you don’t
have tests.
This is an interesting statement. I do agree -- testing is
important and if you lose static typing, it has to take on extra
responsibility. But then let's not compare apples and oranges.
Let's not compare code we write in a statically typed language same
code in a dynamically typed language. Instead, we should be
compared code in a statically typed language against code in a
dynamically typed language plus the test code that might not have to
be written in the presence of a compiler. Suddenly, it's not so
clear where the line should be drawn indicating how much extra test
code and time gets put into a dynamically typed environment.
And, at the risk of being crass, I couldn't pass this up:
> Compilers are great at telling you that you have miss-typed
something or that you assumptions about classes are wrong
Touché :) Having English as a second language, I can make fun.
Alexey
2001 Honda CBR600F4i (CCS)
2002 Suzuki Bandit 1200S
1992 Kawasaki EX500
http://azinger.blogspot.com
http://bsheet.sourceforge.net
http://wcollage.sourceforge.net
From: ivko3 <[email protected]>
To: The Java Posse <[email protected]>
Sent: Fri, April 23, 2010 9:32:37 AM
Subject: [The Java Posse] Re: please explain the desire for a
dynamic typing language
Hi,
I was also wondering why do people make so big fuss around languages
like Groovy, [J]Ruby, PHP, etc.
Then I got the task for a personal website, and I'm doing it in Java
+Spring+JPA + all the stuff around. I want to finish this application
very fast (in the next 5 weeks) and I can work on it only during half
of the week's nights. As I have a hello-world-experience with groovy
and the grails framework, I think that right now I am in position that
I would like to have "loved the Groovy" earlier. Because there,
especially with the help of Grails, you don't have to write all the
boilerplate code. And with a web application that accesses the DB
there's a lot of that (think about all the DAOs and stuff). I know
that in the Java world Spring are doing something in that direction
with Roo, but I would like to have more control than it's offering me.
Anyway, that's another topic.
Directly to your question. My personal opinion is that you can have
very fast results in some mainstream [web-]applications with dynamic
languages and frameworks around them. The lack of compiler seems to be
a problem, but not quite. Just check this blog:
http://misko.hevery.com/2010/04/07/move-over-java-i-have-fallen-in-love-with-javascript
Regards,
Ivan
On Apr 23, 3:57 pm, Robert Casto <[email protected]> wrote:
> I think the issue has to do with features and functionality. They
want to be
> more productive and with these new languages, you can do that. I
think your
> concerns are valid though. Unless you are careful, there are
plenty of
> opportunities for bugs. The new languages do a lot of things
better and they
> are trying to eliminate the problems you mention. Still, I like
being told
> about problems at compile time rather than during testing or
worse, in
> production. I came to Java from C/C++ and enjoyed the garbage
collection,
> simpler reference handling, and other features. These new
languages are much
> more productive, but there are always tradeoffs.
>
>
>
> On Thu, Apr 22, 2010 at 2:06 PM, scphantm <[email protected]>
wrote:
> > ive been looking a few languages the past few days, groovy, ruby
being
> > the big two. i see all over the web people praising the world of
> > dynamic type languages and the same question keeps ringing in my
head,
> > WHY IN THE WORLD WOULD YOU WANT A DYNAMIC TYPING LANGUAGE???? i
came
> > to java from the VB and PHP world. both of those are dynamically
> > typed and it was that one thing that drove me nuts. especially in
> > working with teams of developers. when i moved to java and its
static
> > typing system, everything finally made sense, tweetie birds were
> > flying, humming birds were humming around around and i was in
love, i
> > found a language that is quick and has inherent type checking
built in
> > at compile time.
>
> > i just remember the disasters and amount of bugs that occured
with me
> > in the dark days of (god help me) asp, vbscript, and to an
extent PHP
> > and don't understand why anyone in their right mind would not want
> > their language of choice to be statically typed? ive heard the
answer
> > of, well its easier, in this case in my mind easy=lazy. i don't
get
> > it, please educate me.
>
> > --
> > You received this message because you are subscribed to the
Google Groups
> > "The Java Posse" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<javaposse%[email protected]
>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/javaposse?hl=en.
>
> --
> Robert Castowww.IWantFreeShipping.com
> Find Amazon Filler Items easily!
>
> --
> You received this message because you are subscribed to the Google
Groups "The Java Posse" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to [email protected]
.
> For more options, visit this group athttp://groups.google.com/group/javaposse?hl=en
.
--
You received this message because you are subscribed to the Google
Groups "The Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]
.
For more options, visit this group at http://groups.google.com/group/javaposse?hl=en
.
--
You received this message because you are subscribed to the Google
Groups "The Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]
.
For more options, visit this group at http://groups.google.com/group/javaposse?hl=en
.
--
You received this message because you are subscribed to the Google
Groups "The Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]
.
For more options, visit this group at http://groups.google.com/group/javaposse?hl=en
.
--
You received this message because you are subscribed to the Google Groups "The Java
Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.