[Pharo-users] Dynamic Typing > Static Typing? « games.greggman.com

Sven Van Caekenberghe sven at stfx.eu
Wed Jan 20 03:09:00 EST 2016


> On 20 Jan 2016, at 08:07, stepharo <stepharo at free.fr> wrote:
> 
> What is funny is that in general people do not believe us :).
> So I decided that I do not want to talk with type freaks.

Yes, that was something I forgot to add: it seems that both sides are really very different and opposed to each other. I also gave up this discussion. Personally, I am very much on the dynamic side, but I understand what typing offers. It is just that it does not offer enough: it fixes a small number of problems up front for an enormous cost in added code and loss of flexibility.

What was also in the original article is the point that yes, refactoring is a bit easier, more correct and more powerful in a static typed language, but you need much more refactoring there because of all this extra coding to maintain the type constraints (again for little gain).

Now, Common Lisp has, IMHO, the right approach to optional typing: not (so much) to catch errors, but specifically to instruct/help the compiler produce more efficient code. 

> Stef
> 
> Le 19/1/16 22:09, Sven Van Caekenberghe a écrit :
>> Not that we didn't already know this or that we don't feel like this (else you wouldn't be here), but it is nice to see a concise description and some fact based reasoning around this subject:
>> 
>>> http://games.greggman.com/game/dynamic-typing-static-typing/ <http://games.greggman.com/game/dynamic-typing-static-typing/>
>> In summary:
>> 
>> In a dynamically typed language you write (a lot) less code for a shorter program that is easier and faster to write and debug, which gives you more time to think about what you are doing, resulting in more reliable programs.
>> 
>> Static typing catches only a (very) small amount of typing errors, that are just as easy to handle as dynamic typing exceptions, but they are a bit faster.
>> 
>> Sven
>> 
> 
> 





More information about the Pharo-users mailing list