Code Comments
Programming Forum and web based access to our favorite programming groups."Ilja Preu?" <it@iljapreuss.de> wrote: >Ian Upright wrote: > > >I think the common usage for the term "statically typed language" actually >means "types checked at compile time". What is your usage of the term? My use of the term as I understand it means that the program has type declarations, vs. not having type declarations. If you had a method where are all the variables are typed, and all the arguments and return types are typed, then I would call that a statically typed language. However, we are not forced into verifying all those types at compile time, we could save that work until runtime, or, we could do it at runtime as well as concurrently doing it in the background as additional checks. Eg, you could assume it's all ok, and verify it at runtime, but your compilation process may reveal the type errors (if any) to you at a later time. Also, there are Lint tools and the like that can find errors and potential problems in Smalltalk (dynamically typed) code, which can run like a compilation process. Many Smalltalk IDE's also can compile the method and check it for some correctness (such as sending a message that doesn't exist anywhere). All I'm saying is, that there are variations of the theme from both sides. Dynamically typed languages that can do compilation checks/lint checks, and statically typed languages which can delay static checks until runtime. There are also the in-betweens, where you can have optional static type declarations, such as in the language S#. Thus, in a language like S#, types could be verified at runtime as well as optionally at compile time. I'm just trying to make the point that the method of compilation and type verification is a *language implementation issue* and by no means is an indication whether it is a statically or dynamically typed language. Ian > >Compiling source code to an executable takes linear time - that doesn't hur t >much, especially since only your changes need to be compiled. What hurts is >the non-linear dependency checking that needs to be done in statically type d >languages. In statically typed languages you actually need to actively >manage build time. > >Cheers, Ilja > --- http://www.upright.net/ian/
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.