

The Essence of Dynamic Typing - pwpwp
http://daniel.yokomizo.org/2012/05/essence-of-dynamic-typing.html

======
skrebbel
Nice summary. Some extra commas would've helped.

But what I really often miss in this discussion (dynamic vs static typing),
and also in this article, is that statically typed languages _fundamentally_
allow for better tool support. With modern IDEs and refactoring tools being
pretty powerful weapons, this has a major impact on programmer productivity.

Of course, there is no reason why some sort of refactoring / code inspection
support can't be added to dynamically typed languages, but it's certainly more
difficult to make, and more error-prone.

I believe that in the next decade, this gap will widen, and that because of
this, some statically typed language will be the next hip language. The
current IDEs are too Windowsy for many hackers' tastes, but there is no reason
for this to be so. You can have a VIM-like tool with Visual Studio-like
powers.

~~~
tree_of_item
That's if you prefer tools like Visual Studio to tools like Squeak.

That is, if you prefer your tools to perform static analysis as opposed to
allowing you to inspect and modify your system while it's running.

~~~
skrebbel
That's a fair point which I don't know how to counter well, mostly because I
know virtually nothing about the Smalltalks of this world.

That said, how can you refactor your code while it's running? Also, is dynamic
typing a requirement to get tools like Squeak to work? Or could it work
equally well in statically typed languages?

~~~
tree_of_item
A small example of refactoring running code is at
<http://www.youtube.com/watch?v=1kuoS796vNw>

And a more lengthy example of writing tests first, letting the code fail, and
fixing things in the debugger: <http://vimeo.com/19591202>

This is kind of like writing code that doesn't exist or doesn't work, and
letting the type checker guide you through the things you need to fill in. The
difference is that Smalltalk is actually executing your code, so you can see
actual values rather than just type errors, and it will keep trying to execute
your code while you change things.

It might be possible to do something like that with static typing, but I think
the real issue is that most advocates of static typing wouldn't really _want_
to mess around with programs in inconsistent states in the first place.

------
VeejayRampay
Small light grey code on white background. You might want to change that.

