As far as I can tell Strong/Weak typing is about whether you can change at run-time how the compiler/interpreter treats a certain piece of memory. For example by Type-Casting Pointers. C and C++ are Weakly Typed. Perl 5, Python, Ruby and Java are Strongly Typed. C# is Strongly Typed, except in an "unsafe" block, where it is Weakly Typed.
Static/Dynamic typing is about whether or not you can determine the type of a variable without running it. ie At Compile-time. Perl 5, Python, Ruby are Dynamically Typed. C, C++, Java and C# are Statically Typed.
What caught my eye reading about it on Wikipedia...
- Perl 6 was the only language classified as Hybridly Typed when it comes to Staticness.
- Perl 6 is classified as Strongly Typed, whereas Perl 5 is classified as Weakly Typed. Is that a mistake? I thought Perl 5 was Strongly Typed. In what way is it Weakly Typed?
Also what does Hybridly Typed mean? It sounds cool. What features of Perl 6 make it Hybridly Typed? Are there Perl 5 modules of back-ported Perl 6 features that could give Perl 5 this magic Hybridness too?
-Andrew.
In reply to Perl 6: Static/Dynamic Strong/Weak Type Systems by tomazos
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |