Thursday, March 22, 2012

Strongly-Typed

Hi Folks,

Can someone please explain for me the term:Strongly-Typed please?

I recently heard about it a lot of times.

thanks in advance,

http://en.wikipedia.org/wiki/Strong_typing

Thanks, but it's too general for me.

I need maybe some example please.

Thank You.


ok. Look at this nice example

Strong vs. Weak typing

The division to strong and weak typed languages is much less clear-cut than static vs. dynamic, and there is a lot of confusion on what strong typing means. One common definition isdisallowing operations on incompatible types. Consider the following example from Perl (a weakly typed language):

print "2" + 4;

This code will print '6�� although it seemingly performs addition on incompatible types. This is because Perl is performing an implicit conversion when it sees we want to add a string that represents a number to another number. On the other hand, Ruby is strongly typed and the above statement will generate aTypeError.

More info:http://eli.thegreenplace.net/2006/11/25/a-taxonomy-of-typing-systems/


Ok...

I get something.

Thanks a lot.

0 comments:

Post a Comment