Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^6: regarding intolerance to perl which I observe

by fisher (Priest)
on Aug 01, 2013 at 15:47 UTC ( #1047478=note: print w/ replies, xml ) Need Help??


in reply to Re^5: regarding intolerance to perl which I observe
in thread regarding intolerance to perl which I observe

well, I think I can answer that question of yours since I agree with what previous orator has stated.

I personally don't know Go nor Scala, but I know Erlang and a bit of Haskell. Well, everything you can do in Erlang you can also do in perl, but! But some things will be easier to do in erlang, for example, to spawn a pool of thousands of processes for almost every client.

If you need an example of the radically new feature -- how about the well-known statement that 'if it compiles, it works'? This became possible because of strict typing plus pure functional approach in haskell. And in perl we still teaching newcomers to append those silly 'use strict; use warnings' lines in every single script.

I personally feel the lack of pure functions in perl. I like the idea of *guaranteed* absense of side-effects when it is not otherwise stated. I like to spawn a lot of isolated workers as simple as a *click* by two fingers. And no worries about threads and shared data and all that scary stuff -- we have actors communicating with each other by sending messages to each other. 'Everything is a process' can be a motto for erlang.

But despite of all that said above there's still a niche for perl. When I want, for example, to analyze the web server's output, or gather some data from logfile or even do some sketch on 'how it should work' using FCGI + nginx -- I don't know the better tool than perl for these kind of task.

Well, soething like that.


Comment on Re^6: regarding intolerance to perl which I observe
Re^7: regarding intolerance to perl which I observe
by tobyink (Abbot) on Aug 01, 2013 at 17:53 UTC

    "If it compiles, it works" is a pipe dream. "If it compiles, then it will do something" is probably the best we can hope for. Strong typing isn't enough to prevent logic errors.

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
Re^7: regarding intolerance to perl which I observe
by Your Mother (Canon) on Aug 01, 2013 at 18:23 UTC

    The operative term in the original statement and the follow-up question being "new." Haskell is almost the same age as Perl, as is Python and Ruby is just a few years younger. Either these things were always a better choice than Perl and Perl's success is just some bizarre aberration or Perl is still just as valid a choice. And Erlang is optimized for a very specific use case. I wouldn't attempt to use perl to parse client side DOM either. I looked at Scala the smallest bit a couple years ago and nothing leapt out to distinguish it. On the contrary, it seemed Perl-like without as much flexibility. Which obviously some feel is a strength. I disagree.

    Use Perl for what you want. Call it a niche tool if you prefer. If you find general attitudes to Perl to be "it's no good," don't expect your attitude to do anything but cement the views. Well, sure it's okay for prototyping web stuff but why go to all the trouble to learn such a messy, goddawful language just do hello world in a webpage? I mean, you can parse a log file with awk."

    I use strictures or equivalent in scripts. I also write one-liners all day. If I had to qualify variables and namespaces and return values and… for them, I'd start looking for another tool. Perl lets you be a lousy hacker without complaint, it's true, but it also doesn't get in your way at all when you know what you're doing. Professional tools have fewer safety features than kids’ toys and institutional, packer-oriented workflows.

    Happened across this yesterday right after commenting in this thread and it seemed very pointed to me–

    With regard to the “wrong equipment” … Unlike most musicians, Josh Homme doesn’t just dabble in a bit of engineering when necessary, but has a genuine love for the métier. “I love [music] engineering… …I found over the years that if everyone is using something, it can’t be that good!” soundonsound.com/sos/feb10/articles/homme.htm

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2014-09-23 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls