Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
DynamicTyping
Edit
PageHistory
Diff
Info
LikePages
!!!Dynamic Typing This is the opposite to StaticallyTyped, where type checks are done at runtime. For instance [Python] is an example of a dynamically typed language, it allows you to pass any type to a function, however some internal functions can only take specific types. for example: def mul(a,b): return a*b >>> print mul(2,3) ''6'' >>> print mul("*",3) ''***'' >>> print mul("*","*") ''Traceback (most recent call last):'' '' File "<stdin>", line 1, in ?'' ''!TypeError: unsupported operand type(s) for *: 'str' and 'str' '' [Scheme], [Perl], [Python], SmallTalk, bash(1) are all Dynamically Typed languages, it's quite common for scripting languages to be dynamically typed.
4 pages link to
DynamicTyping
:
StaticallyTyped
WeaklyTyped
StronglyTyped
JavaScript