'm going to stick my neck out and say I like Perl -- so I think this is good news. However, I've always thought of Perl as a text-processing language, and In My Limited Experience, mobile phones can only fit about ten words on the screen. {on the other hand, this could simply lead to phones with bigger screens.}
There's no denying that you can write really ugly code in Perl, but you can also write beautiul code in Perl. I think some of the people who knock Perl are confusing "undisciplined" with "not anal retentive". Perl was always based around the idea of serving the end rather than the means -- it's about where you're at, rather than how you got there. It does not impose a particular style on the programmer. Thus, for any given task, there could be many, many ways to accomplish it in Perl.
They're all right.
Some will be faster than others, some will use fewer resources than others, some will look prettier then others when viewed as source. But if you don't care enough about those things to mention them in the design spec, then they don't matter.
Now, you can have your fancy object-oriented stuff, but in many ways it's overkill. For instance, if you needed to write a programme involving geometry, you could create an Angle object which would have a value assumed to be in radians and properties for its sine, cosine, tangent and representation in degrees; a Distance object which would have properties for its representation in different measuring units; and assigning a value to any property would affect the object and therefore its other properties. It might be beautiful if you like the OO concept, but it's a bit overkill if you just want to find the missing side of a triangle.
And does a "disposable" programme -- one that you will run only a few times before forgetting it forever -- really need to look pretty anyway?
As for PHP, well, it really isn't much different from Perl -- apart from always needing to put brackets around function parameters, the fact that all variables start with a $ sign whether scalar, array or hash and there is no $_. {I happen to love $_. It goes nicely with the concept of an accumulator. If you never did any assembly language, you probably won't know what I'm talking about, though}. That is hardly surprising, because the original PHP was actually written in Perl to be like a kind of subset of Perl.
Also, one of my little niggles -- and I freely admit that this is just my own opinion -- is the inability to get on with any language that uses the plus sign as the string concatenation operator while letting you freely mix string and numberic variables. {*cough* ruby *cough*} I expect "2" + 2 to equal 4, not 22. Hell, if I have to do something to my variables before I can add them, that just nullified the advantage of having freely-mixable scalar types! It might as well be a strict-typed language and barf on an expression such as "2" + 2!
As for Python - well, it's not my cup of tea {I guess you like either Perl or Python} but other people seem to have written some pretty good stuff in it, so I shan't knock it.
geek gets into a night club with real live women and what does he do? He programs perl. jeez
--
---
We spoke for about a half an hour. I don't recall a thing we said. - Colorblind James Experience
Re:hmm... Perl in a **nightclub**
by
hype7
·
· Score: 5, Funny
perl in a nightclub?
I do not think that word means what you think it means...
-- james
There are better languages for this, like ChucK
by
Trepidity
·
· Score: 5, Informative
ChucK is a "concurrent, on-the-fly audio programming language", designed from the ground up precisely for this application: live programming of generative music.
We are confused. What is this 'chick' you speak off?
The Slashbot Collective Hivemind
--
-- We are the collective Slashbot HiveMind
Re:Perl
by
Anonymous Coward
·
· Score: 5, Informative
Incorrect.
cogsci.princeton.edu -
Program - a sequence of instructions that a computer can interpret and execute;
The text file itself is only a script. The script + interpreter is a full program (also worth nothing that several people have whipped up programs that allows you to compile Perl scripts in to native binaries)
Perl code is hard to re-use, huh?
by
Anonymous Coward
·
· Score: 5, Funny
Guess I'm a genius for using modules from CPAN, and I didn't even know it.
'm going to stick my neck out and say I like Perl -- so I think this is good news. However, I've always thought of Perl as a text-processing language, and In My Limited Experience, mobile phones can only fit about ten words on the screen. {on the other hand, this could simply lead to phones with bigger screens.}
There's no denying that you can write really ugly code in Perl, but you can also write beautiul code in Perl. I think some of the people who knock Perl are confusing "undisciplined" with "not anal retentive". Perl was always based around the idea of serving the end rather than the means -- it's about where you're at, rather than how you got there. It does not impose a particular style on the programmer. Thus, for any given task, there could be many, many ways to accomplish it in Perl.
They're all right.
Some will be faster than others, some will use fewer resources than others, some will look prettier then others when viewed as source. But if you don't care enough about those things to mention them in the design spec, then they don't matter.
Now, you can have your fancy object-oriented stuff, but in many ways it's overkill. For instance, if you needed to write a programme involving geometry, you could create an Angle object which would have a value assumed to be in radians and properties for its sine, cosine, tangent and representation in degrees; a Distance object which would have properties for its representation in different measuring units; and assigning a value to any property would affect the object and therefore its other properties. It might be beautiful if you like the OO concept, but it's a bit overkill if you just want to find the missing side of a triangle.
And does a "disposable" programme -- one that you will run only a few times before forgetting it forever -- really need to look pretty anyway?
As for PHP, well, it really isn't much different from Perl -- apart from always needing to put brackets around function parameters, the fact that all variables start with a $ sign whether scalar, array or hash and there is no $_. {I happen to love $_. It goes nicely with the concept of an accumulator. If you never did any assembly language, you probably won't know what I'm talking about, though}. That is hardly surprising, because the original PHP was actually written in Perl to be like a kind of subset of Perl.
Also, one of my little niggles -- and I freely admit that this is just my own opinion -- is the inability to get on with any language that uses the plus sign as the string concatenation operator while letting you freely mix string and numberic variables. {*cough* ruby *cough*} I expect "2" + 2 to equal 4, not 22. Hell, if I have to do something to my variables before I can add them, that just nullified the advantage of having freely-mixable scalar types! It might as well be a strict-typed language and barf on an expression such as "2" + 2!
As for Python - well, it's not my cup of tea {I guess you like either Perl or Python} but other people seem to have written some pretty good stuff in it, so I shan't knock it.
--
We are the collective Slashbot HiveMind
I usually go to nightclubs to dance and meet women, but I guess this is the Slashdot Way.
play that funkya h xinU / lreP rehtona tsuJ";sub p{q *=2) +=$f=!fork;map{$P=$P[$f^ord[ P.]/&&
@P=split//,".URRUU\c8R";@d=split//,"\nrekc
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^
close$_}%p;wait until$?;map{/^r/&&}%p;$_=$d[$q];sleep rand(2)if/\S/;print
till you die
geek gets into a night club with real live women and what does he do? He programs perl. jeez
---
We spoke for about a half an hour. I don't recall a thing we said. - Colorblind James Experience
perl in a nightclub?
I do not think that word means what you think it means...
-- james
ChucK is a "concurrent, on-the-fly audio programming language", designed from the ground up precisely for this application: live programming of generative music.
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
We are confused. What is this 'chick' you speak off?
The Slashbot Collective Hivemind
--
We are the collective Slashbot HiveMind
Incorrect.
cogsci.princeton.edu -
Program - a sequence of instructions that a computer can interpret and execute;
The text file itself is only a script. The script + interpreter is a full program (also worth nothing that several people have whipped up programs that allows you to compile Perl scripts in to native binaries)
Guess I'm a genius for using modules from CPAN, and I didn't even know it.