Link Details

Link 40188 thumbnail
User 216692 avatar

By madlep
via rawblock.blogspot.com
Published: Sep 08 2007 / 17:28

The one thing I've always liked when working with static type systems, and one that is often glossed over when discussing dynamic typing systems, is how easily tools can interpret and navigate code. When coding Java in Eclipse, it's amazing how easy understanding a massive code base can become. You've got simple hyperlink navigation, sophisticated refactorings, and smart code analysis that can show you what is called from where and how. Even interfaces and figuring out which implementation is used (which is kinda dynamic typing for Java) can be groked easily with a good IDE.
  • 29
  • 4
  • 2288
  • 688

Comments

Add your comment
User 238564 avatar

FlySwat replied ago:

0 votes Vote down Vote up Reply

A great example for this is strongly typed datasets.

This allows the IDE to give you code completion based on table/column names and is a huge time saver when writing database code.

Compared to the alternative of passing the column name as a string and having to go look at the database schema and make sure you have it right.

User 179375 avatar

Ricky Clarkson replied ago:

-3 votes Vote down Vote up Reply

You're mixing up static typing and strong typing. Programmers in dynamic languages don't tend to use strings for everything.

User 208661 avatar

Qrilka replied ago:

0 votes Vote down Vote up Reply

You miss the point.
E.g. if you have dataset.x = 11 in statically typed language you'll get an error if field x is a string, but in dynamically typed language you'll get an error ONLY in runtime, so to check this you need to write some unit tests at least (which should be better written anyway :) )

User 203303 avatar

Craig Tataryn replied ago:

0 votes Vote down Vote up Reply

But then again if the language supports boxing/unboxing then the dataset.x=11 might be perfectly valid.

User 208661 avatar

Qrilka replied ago:

0 votes Vote down Vote up Reply

With boxing (in Java/C#) you'll get Object which is not a String to get it working you need implicit casts

User 179375 avatar

Ricky Clarkson replied ago:

0 votes Vote down Vote up Reply

If x is a string, why are you writing x=11?

User 245678 avatar

TopTorials replied ago:

0 votes Vote down Vote up Reply

I totally agree!

User 107114 avatar

daniel replied ago:

0 votes Vote down Vote up Reply

I tend to agree with Julian on this point. Don't get me wrong, I love dynamic typing and all the benefits which come with it (like duck typing). Most people don't realize how liberating it is to just never worry about type issues. However, in a large scale application, where you need to actually *maintain* your code, static typing is extremely useful. I couldn't imagine writing an IDE in Ruby any more than I could imagine writing a quickie script in Java.

User 179375 avatar

Ricky Clarkson replied ago:

0 votes Vote down Vote up Reply

I assume that most programmers of dynamic languages build their projects from smaller parts, rather than making one big codebase. That's probably how they make their code maintainable.

User 245849 avatar

AshleyF replied ago:

0 votes Vote down Vote up Reply

Type inference can make a static typed languages feel very much like a dynamic one - get the best of both worlds! (e.g. F#)

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.