Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Perl speciality

by tokpela (Chaplain)
on Aug 13, 2009 at 09:16 UTC ( #788176=note: print w/ replies, xml ) Need Help??


in reply to Perl speciality

In my opinion, Perl allows you to focus on the problems you want to solve without having to worry as much about the computer.

Some simple comparative examples include no need to allocated memory as you do in C and no strong typing in Perl.

For example, in Perl to make a string you just declare it.

my $string = "This is my string";

Notice that I didn't have to allocate any memory for the variable either.

There are probably many other comparisons but the basic summation in my opinion is that Perl will allow you to focus more on your problems once you get over the initial learning curve and less on the particulars of dealing with memory management and strong typing.


Comment on Re: Perl speciality
Download Code
Re^2: Perl speciality
by JavaFan (Canon) on Aug 13, 2009 at 10:27 UTC
    For example, in Perl to make a string you just declare it.
    my $string = "This is my string";
    Oh, yes, that's so different from C:
    char *string = "This is my string";
    Come on, if this is the best you can come up for something that's different between Perl and C, there would be no reason to bother with Perl.
      Come on, if this is the best you can come up for something that's different between Perl and C, there would be no reason to bother with Perl.

      That is easy target for criticism. Please you provide a reason.

        One of my favorites is returning a list.
        my ($r,$g,$b) = getColor($widget);
        Easy! No messing around with a bunch of pointers.

      Yes, and then

      $string .= ". And now it's longer.";
      is just like ... erm ... how was that ... (I will not even try).

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

        Oh, I know, and I can give a gazillion more examples. *I* know the difference between Perl and C. I'm not claiming at all that Perl and C are similar. I'm just pointing out that the example given is a piss-poor example.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2014-08-27 22:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (253 votes), past polls