Re: Programming Languages
by Lawliet (Curate) on Aug 15, 2008 at 05:47 UTC
|
Very inspiring node, sstevens. It really made me think about my own experiences. I have been programming for two years (at most) with Perl being my first and only language. Of course, the first year was spent adapting my mind to Perl (no kidding, when I first picked up the language I had a hard time grasping why newline characters went inside the quotes, among other things). I have tried to get into python because it seems like a really fun and efficient language to program with but my attempts are fruitless. I always come back to the familiar; superior; Perl.
I wonder what would have happened if I learned another language first. Would I always revert back to that, or is it just Perl is so much easier?
Perl is like an extension of my own mind, and I cannot wait to learn more.</corny>
I'm so adjective, I verb nouns! chomp; # nom nom nom
| [reply] |
|
| [reply] |
|
++ but do learn another language or more. Preferably, learn something less like Perl than Python. It helps you as a programmer if you can see how to tackle problems in more than one way instead of just in more than one syntax.
Scheme and Common Lisp are relatively popular choices. They lend themselves to approaches that can be useful in Perl, but which are different from the approaches of people more comfortable with C or Pascal descended (ultimately Algol descended) languages. Haskell, Prolog, Smalltalk, Postscript, Erlang, and Forth would be good options, too.
There is a middle ground, too. There are other languages more like Perl in many ways than those mentioned in the previous paragraph which are still more distantly related than Python or Ruby. JavaScript, Ada, Fortran, and Lua are some with lots of documentation and source code out there. A+, HaXe, or hundreds (thousands) of other languages have been created and see some use, but are not necessarily groundbreaking in and of themselves.
Some languages are mostly for playing with the concept of a programming language and implementing something in an unusual way. These aren't really useful, in general, for writing real software. They can be a fun learning experience, though. It's probably best to learn a few languages before playing with them, though. Unlambda, Intercal, Path, Dis, and Befunge are examples. Unfortunately, m4 and TECO's command mode appear to be examples in this set but are not. ;-)
| [reply] |
|
| [reply] |
|
Re: Programming Languages
by samtregar (Abbot) on Aug 16, 2008 at 17:24 UTC
|
There really isn't any point to this rant. Maybe I'll find this in a couple years when I feel like I need to switch to another language, and I'll not waste my time.
I think the key is to wait for a problem that you can't easily solve in Perl, or that you can solve more easily in another language. Switching to LISP for web development is just going to make LISP look bad - Perl definitely has that problem licked.
I was in favor of switching to Erlang for a project at a prior job. Erlang isn't a better general-purpose language than Perl, not even close (thank you CPAN!). But it does offer really convenient distributed, fault-tolerant multi-processing. The next time I'm working on a parallel-processing server with high up-time requirements I'll be tempted again. It's certainly do-able with Perl but you pretty much have to roll it from scratch.
Similarly, if anyone ever asks you to write a client side GUI (and you can't talk them out of it), I think you'd be foolish to do it with Perl. Sure, it can be done but it won't be easy. Switching to something built for the task - Java, C#, Air, etc - is probably worth the effort.
I guess the biggest challenge to a comfortable Perl programmer is being able to realize when it's time to find a new tool. Perl can do so much so easily that we can very easily slip into thinking Perl can do everything!
-sam
| [reply] |
Re: Programming Languages
by Joost (Canon) on Aug 16, 2008 at 00:46 UTC
|
All of this sounds a lot like my experiences. On the whole, I'd lay out my conclusions like this:
1. Common Lisp is incredibly powerful, but you'll have to write most infrastructure yourself (to be fair; lisp does make it pretty easy to do that).
2. Ruby with Rails is great but you'll have to take the "enforced" structure with it (which is pretty good) or you'll end up at point 1, except that CL really is a more flexible language than Ruby. Neither CL or Ruby extensions are well documented in general compared to CPAN.
3. Perl with DBIx::Class / Class::DBI and a couple of good mod_perl controller classes will give you a good start, but you'll have to choose a bunch of good CPAN modules to provide for the base of your project. Forget about integrated solutions, but the documentation is good.
| [reply] |
Re: Programming Languages
by samizdat (Vicar) on Aug 15, 2008 at 13:29 UTC
|
| [reply] |
|
I didn't mean to say that anything I mentioned was bad, or that I could do a better job implementing it.
With Lisp, I said I was fighting it because I don't have the Lisp mindset. I'm sure if I spent more time with it, I'd really grow to like it. I know that Apache, mod_lisp, Hunchentoot, and Lisp itself are especially intricate and well-engineered. I can't imagine ever being at a level to implement even a piece of what the people behind those technologies have implemented.
I certainly did not mean to ding Rails. Far from it. When I was working with it, I was amazed at everything it does for you. I merely meant that I would rather work with something simple (again, relatively. By no means do I mean "so simple that I could do it, or that I even understand it") than use a framework like Rails (or maybe even Catalyst -- I've never played with it). I'm not saying that the MVC design pattern is stupid or overrated. I've played with it before in school and I actually think it's fan-freaking-tastic. I'm also not saying that I want to do everything myself -- if that were true, I'd have to make my own language, interpreter, OS, computer, transistor, etc.
I never said I understand the inner workings of Perl or that Perl is better than anything else. I simply said I like it more.
I do think Perl is a pearl. I make my living (as do most of the monks here, I'm guessing) by writing programs. Perl makes it easy for me to do that. That's all there is to it. No reading between the lines or taking this to mean that all other languages suck. Of course other people can get more done with languages other than Perl. That's fine! If I was going to make a multi-purpose robotic simulator that demonstrates a Q-Learning agent's ability to learn as it navigates and adapts to indoor and outdoor environments, I might not choose Perl as the language to write it in.
| [reply] |
|
| [reply] |
Re: Programming Languages
by cormanaz (Deacon) on Aug 16, 2008 at 00:16 UTC
|
Well said, sstevens. I describe Perl to the unenlightened as is the Swiss Army Knife of programming languages. I have yet to find anything it can't do.
I haven't tried Lisp. I can assure you that Perl beats the hell out of <show-age>Fortran and PL/I</show-age>. I also could not see what all the fuss is about with Ruby. Java snobs always sniff about how superior their language is, and how "unmaintainable" Perl is. But I find Java inscrutable because of its atomistic style with all the teeny-tiny methods scattered all over the place. Anyway if I wanted that I could do it with OO Perl. Plus declaring EVERY SINGLE THING is just plain annoying. I can prototype code in Perl in a quarter of the time it takes in Java. Viva la Perl! (Or is it el Perl?) | [reply] |
|
<offtopic>
Viva la Perl! (Or is it el Perl?)
If you are thinking of Perl as pearl (you know, the oyster's pearl) then it would be "la". But if you are referring to the programming language Perl, it doesn't go with an article because it's a proper name.
So it would be "Viva Perl!".
PS: This got me thinking that, in spite of Larry thinking of Perl as one of his daughters, in spanish Perl thought as a programming language would be male because the noun "language" is male.
</offtopic>
| [reply] |
Re: Programming Languages
by rudder (Scribe) on Aug 16, 2008 at 02:47 UTC
|
I can get things done in Perl quickly and painlessly (relatively speaking).
I think that's one key right there. I don't want to have to work for my tools -- they should work for me. And Perl seems happy to oblige.
Also, I agree about the community. Haven't seen its equal.
| [reply] |
Re: Programming Languages
by PetaMem (Priest) on Aug 18, 2008 at 16:07 UTC
|
LISP is certainly a mighty language but I can't stand the brackets.
But LISP *is* useful. We would not have had The Gimp if it wasn't for Common Lisp!
Gimp History (the first 2-3 paragraphs are sufficient)
| [reply] |