|Perl Monk, Perl Meditation|
Re: Perl as a Strong-Type and Dynanmic Programming Languageby nikosv (Hermit)
|on Aug 29, 2010 at 07:36 UTC||Need Help??|
would you say that Perl is not a strong type language since we do not need to define the type of the variable?
Strong typing has no much to do with variable types, it has to do with conversions from one type to another. Strongly typed languages typically disallow implicit conversions between unrelated types. What you are referring to is static typing
Questions about whether a language is strongly typed or not don't lead to anything productive.
I do believe the same but at the same time think that it could get important when you want use more than one language in a project or you want to learn a new language, and can potentially face issues that can arise from the variation in their type systems
For example if one is accustomed in writing in VB.net and wants to write in C# as well, he could find the transition not so smooth, not because of that they are different languages per se, but because their type systems allow or disallow certain operations which could interfere with existing experience.
For example in VB.net the Object type behaves dynamic language style(when option strict off is turned off) while in C# the behaviour is purely statical (until lately one would have to use the Reflection services to get dynamic style behaviour) or as far as weak typing goes, the compiler would allow implicit conversions between unrelated types in an expression evaluation i.e treat a string as a number (like VB.net and Perl do) while in C# would not.
Certainly, one cannot label a language as purely strongly typed or purely weakly typed because even Perl notoriously labeled as weakly typed displays strong typing properties ,in some cases, but I think that if one has a grasp on the principles would enjoy a smoother transition and/or improved production