Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Strong typing and Type Safety.A multilanguage approach

by zentara (Archbishop)
on Nov 19, 2010 at 17:33 UTC ( [id://872558]=note: print w/replies, xml ) Need Help??


in reply to Strong typing and Type Safety.A multilanguage approach

Your article mentions alot of Perl finepoints, for which all have a best practices, for instance you write:
Consider another example : open( my $FILEHANDLE, '<', 'myfile.txt' ); $a=<$FILEHANDLE>; #<> returns just one line open( my $FILEHANDLE, '<', 'myfile.txt' ); @a=<$FILEHANDLE>; #<> returns the whole file contents the diamond operator returns different values depending on the context +.
So what? Thats a handy tool to have in the hands of an experienced programmer. So what do YOU think of Perl's automatic type handling? As a fairly long time user, I can say it makes programming alot easier, rather than being forced to make casts and lines of empty prototype specifications.

Now it does slow processing, to have the program itself, determine variable types, but when you need speed, you can always reach for C or Fortran. ( and call it from Perl thru IPC :-) )


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^2: Strong typing and Type Safety.A multilanguage approach
by nikosv (Deacon) on Nov 20, 2010 at 08:17 UTC
    this was an example to show the difference between list and scalar contexts in Perl as the other examples in that section try to do
      ... but my real question, not to hassle you, was: what do you personally think of this sort of Perl loose typing? C,mon... what is your personal preference? :-)

      You did want our comments, didn't you?

      Personally, I see Perl as one step up in the race for pure artificial intelligence, it works the way I think, it deals with the topic of context.


      I'm not really a human, but I play one on earth.
      Old Perl Programmer Haiku ................... flash japh

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-20 02:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found