I like to experiment. Sometimes, I'll try a piece of code that emulates LambdaCalculusChurchNumerals?, or one that reads itself and uses itself as an execution variable. I am not the only one. There are others like me, who do not have to code, and do it just for fun. to see what's going to happen when they execute.
You could for example do the LambdaCalculus thing in SchemeLanguage. You'd need an interpreter, for the right os. you wouldn't be able to port it. PerlLanguage is so easy to port it's scary.
It would be harder to do the second thing in scheme. the second thing is hard in any compiled language. It's easy in any assembly (but porting kick you in the chin). A breeze in Perl.
The first thing, I guess could be done in any type of OO language, but why? Code in JavaLanguage, and create 20 different files, in 20 different directories. Not dissing java, it's good, but not for a 5 minute thing. Plus, I feel guilty every time I code a static. It's like 'man, I'm not doing it right'. CeeCeePlusPlus, spend 1 hour coding the right mem alloc structure, the copy constructors (you need those, otherwise all the pointers in the objects you pass to functions as arguments are the same in the copy. accessing the same memory. When your destructor comes in at the end, you're f*d). You can then spend 10 mins coding the actual stuff. Forget it. Oh, and perl is really very good at OO. In fact, there's like 5 different ways to create an object (don't know them all).
PrologLanguage. k, fine. but again if your running on a server, go and ask them for an interpreter.
And if your experiment involves any kind of string processing, you can forget about it. Oh wait, I forgot. Java does have support for RegularExpressions. Yeah, funny.
Perl programming is honest. It does not pretend to be a paradigm, or to be the answer to complexity. Instead, it chooses to be a tool, and to give you the freedom to choose to be structured or not. and like a tool, the more you practice, the better you get at syntax reduction rather than at function memorization. Which is true of CeeLanguage also I guess.
-- FranckBinard
Isn't there a CPAN module for doing Prologish logic programming in Perl? (The two biggest arguments in favor of Perl are CPAN & that it may be already installed on a machine--particularly a machine that it would be hard of you to get something else installed on.)
BTW, I think all four Scheme implementations that came pre-installed with my Linux distribution support regex. The three that I installed on Mac OS certainly do. Although, in at least one case the built-in regex support was only POSIX regexs, so I had to add this complex code to my program:
(load "pregexp.scm")(BTW, if you like to play with programming, you really should get a Linux installation to play with, be it dual-boot, in a VM, or just a Live CD. See AllLanguagesAreAlive.)
The implementations of EcmaScript I use on many platforms have good regex support as well. & Ruby.
Perl's advantage in text processing (if it ever really had one) looks awfully thin to me these days.
I think I get what you're saying. It's a sort of anti-advocacy, perhaps? A bit of programming carpe diem? Yet, you come too close to the advocacy arguments, I think.