For Programmers: Free Programming Magazines  


Home > Archive > Functional > July 2007 > Re: shootout: implementing an interpreter for a simple procedural language Minim









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: shootout: implementing an interpreter for a simple procedural language Minim
Matthias Blume

2007-07-31, 4:19 am

Andrew Reilly <andrew-newspost@areilly.bpc-users.org> writes:

> On Mon, 30 Jul 2007 08:50:55 -0500, Matthias Blume wrote:
>
>
> Why wouldn't that runtime test turn into a compile-time test with
> sufficiently vigorous constant propagation?


Constant propagation, obviously, only works for constants.

> Or are we talking about runtime Int values (which obviously need
> runtime checking in either style of type system)?


Yes, indeed. If the value is read from a network connection, then
there obviously is no choice -- one /has/ to establish the properties
in question by testing them. What static types do for you is that
they can track the fact that you have done the dynamic test, so that
"downstream" from the test you have proof that you don't have to do it
again.

Matthias
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com