Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Perl as a Strong-Type and Dynanmic Programming Language

by Jenda (Abbot)
on Aug 30, 2010 at 21:04 UTC ( [id://858079]=note: print w/replies, xml ) Need Help??


in reply to Perl as a Strong-Type and Dynanmic Programming Language

You don't need to have to specify the type for the language to be strong typed. Ask Google about "type inference". There are languages that do not expect you to declare the types (most of the time), because they can infer the type and test the consistency of a variable's/function's use. Actually for the most simple cases you no longer have to specify the type even in C# or VB.Net.

Jenda
Enoch was right!
Enjoy the last years of Rome.

Replies are listed 'Best First'.
Re^2: Perl as a Strong-Type and Dynanmic Programming Language
by nikosv (Deacon) on Aug 31, 2010 at 05:48 UTC

    However it should be pointed out that type inference is a compile time afair and not a runtime afair;C# did not turn dynamic because of the use of the 'var' keyword.

    In the most simple cases such as with primitive data types, type inference provides a shortcut instead of explicitly denoting the type of the variable :

    var a=10; #the compiler infers that a is an int

    but its real value comes when having to assign the return value of an expression's evaluation to a variable and is difficult to work out the variable's type so you must cast or re-cast;cases like that occur frequently with Linq queries

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://858079]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-03-29 08:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found