# Static v. dynamic typing

**URL:** <https://www.ruby-forum.com/t/static-v-dynamic-typing/76037>\
**Category:** Ruby\
**Created:** [March 3, 2006, 12:54am UTC](https://www.ruby-forum.com/t/static-v-dynamic-typing/76037 "2006-03-03T00:54:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Dunn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/6f9a4e/32.png) [@Christopher\_Dunn](https://www.ruby-forum.com/u/Christopher_Dunn)\
**Post date:** [March 3, 2006, 12:54am UTC](https://www.ruby-forum.com/t/static-v-dynamic-typing/76037/1 "2006-03-03T00:54:20Z")

</div>

> Ruby is SLOW! Even compared to Python.

i’ve never had a problem with this and am routinely process files  
ranging  
from  
40mb to 3gb - one only has to use c extensions.

That’s true. You can always fall back on an extension. The thing is, I  
actually prefer Python for C++ proto-typing. It maps so well to C++,  
STL,  
and Boost.

why do you see dynamic typing as a contributor to slowdown?

I’m no expert. There were interesting remarks on this point from the  
author  
of Boo. This is from the Boo FAQ:  
Performance: since it is statically typed, can I expect a performance  
equal  
or close to c# or [vb.net](http://vb.net)?

Yes.

At the Digital Mars D language website (D is the way C++ should be)  
there is  
a comment that a compiler writer should have had more input into the  
design  
of C++. D is blazingly fast, but significantly easier to read and to  
code  
than C++. It also includes integrated testing and design-by-contract.

So ‘agile’ does not have to mean ‘slow’.

> Boo and Ocaml are examples of fast, agile languages, and if more companies  
> would adopt them, I’d switch in a heartbeat.

ocaml is very good - but it’s a massive paradigm shift for most people’s  
thought train… most real world problems are imperitive.

Ruby is quite a paradigm shift itself! Continuations are mind-blowing.  
I love the whole concept.

What I’m saying is that the author of Boo, by realizing the difference  
between dynamic-typing and type-inferencing, achieved the best of both  
worlds.

---

<div class="post-metadata">

**Author:** ![Christopher\_Dunn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/6f9a4e/32.png) [@Christopher\_Dunn](https://www.ruby-forum.com/u/Christopher_Dunn)\
**Post date:** [March 3, 2006, 1:01pm UTC](https://www.ruby-forum.com/t/static-v-dynamic-typing/76037/2 "2006-03-03T13:01:30Z")

</div>

On Fri, 3 Mar 2006 08:53:06 +0900, Christopher Dunn wrote:

> why do you see dynamic typing as a contributor to slowdown?

Lisp is dynamic typed, but there are Lisp compilers with C-like  
performances.
