[Pharo-users] Dynamic Typing > Static Typing? « games.greggman.com
mbaehr at email.archlab.tuwien.ac.at
Tue Jan 19 23:53:00 EST 2016
Excerpts from Sven Van Caekenberghe's message of 2016-01-19 22:09:44 +0100:
> > http://games.greggman.com/game/dynamic-typing-static-typing/ <http://games.greggman.com/game/dynamic-typing-static-typing/>
> 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.
if that is the case, then why are people working on typescript, why are both
python and ruby getting optional types?
i think this is a comparison of apples with oranges.
even without typing languages like java, c and c++ are significantly different
from dynamic languages like python, ruby, smalltalk and others.
and eat it too.
so i'll wait for this study to be redone in the next decade, to compare typed
truth. does adding types, with everything else being equal, really make a
difference, or not?
btw: the guys at rubyrogues make an interesting argument why lack of typing
works better in smalltalk than it does in ruby:
read page 8 of that transcript.
basically they are saying that because java and c/c++ are compiled they can be
analyzed statically and you can build great refactoring tools for them because
the tools can predict which methods are the same.
and in difference to that smalltalk and lisp only know the code at runtime and
so they can't make those predictions. but they make up for that because they
are always running. there is no such thing as not runtime. you can simply ask
the system about its state, like find out which object in the whole system
would respond to a particular message. and in ruby you can't do either of those.
disclaimer: for the last 20 years, my main programming language has been pike,
a dynamic language like smalltalk, but with declarative typing. (it's optional,
in the sense that you can declare a type as "mixed" which can be anything, so
just like typescript, and how python and ruby will be once they have optional
eKita - the online platform for your entire academic life
chief engineer eKita.co
pike programmer pike.lysator.liu.se caudium.net societyserver.org
foresight developer foresightlinux.org realss.com
Martin Bähr working in china http://societyserver.org/mbaehr/
More information about the Pharo-users