Re: If Perl was my first language...
by FoxtrotUniform (Prior) on Jul 09, 2004 at 04:04 UTC
|
Rather than a second language, per se, I'd suggest
that you learn some functional programming techniques
(hardcore list manipulation and lambda-slinging, mostly).
Whether you do that with Haskell,
Scheme, or Perl is up to you.
(Perl has pretty much all the support you need for a basic
intro to functional programming techniques --
map, anonymous subs, closures;
you name it.)
Breaking out of the pervasive loops-and-variables
mindset can be quite rewarding, and opens up a number of new
WTDIs. (WsTDI?)
--
F
o
x
t
r
o
t
U
n
i
f
o
r
m
Found a typo in this node? /msg me
% man 3 strfry
| [reply] [d/l] [select] |
|
| [reply] |
|
A good place to start with Scheme on Windows is DrScheme, as it has a nice GUI with some decent documentation to boot and works straight out of the box (see. zip file). Bringing it back to perl, the ever-inventive Autrijus has made Inline::MzScheme which allows you to interface with mzscheme within perl. If that's not enough the industrious samtregar has created Inline::Guile which is an interface to Guile, the GNU implementation of Scheme (as I understand it).
| [reply] |
|
|
|
There are zillions of Scheme interpreters. It seems that everybody, at
some point in their lives, write or at least try to write a Scheme
implementation. -- Well, I haven't written one yet, but I have ported one to
Minix. Lost the source when my laptop was stolen (aeons ago), and then lost
interest. (Why Minix? The beast had only 2 MB of RAM and couldn't run
anything else :) )
schemers.org is a good resource for
schemers. The FAQ
lists some of the implementation. For a quick start try this
Java applet straight
from your browser. Did you know that you can have a
complete Scheme
implementation in your pocket?
| [reply] |
Re: If Perl was my first language...
by stvn (Monsignor) on Jul 09, 2004 at 05:45 UTC
|
I agree with FoxTrotUniform, functional languages are really great at getting your head in a new space. Assembly/C, I am not so sure about, its good to have an understanding (a solid one) of how a processor and computer works, but I don't see why you need to get that close to the metal to understand that, the levels of abstraction are there for a reason, to buffer you from the metal. Anyway, that is likely an unpopular opinion around here, as I know we have many a C/Assembly hacker lurking around the monostary, but it just never appealed to me as anything I wanted to get into seriously and actually program in (read about yes, program, ahhh not so much).
OOP is something that will not go away and you will likely find it more of a requirement as you continue to work/grow as a programmer. And not all OOP langauges are the same, there are many different types and styles out there. Java and C++ are ok (IMO of course), but they are sort of steps on an evolutionary ladder, of which I think C# is the next step (or half-step maybe). If you don't like Windows (which I don't myself, I am a Mac User all the way), then you can try out Mono, its not quite as finished as M$.NET, but its better than nothing. I recently delved into C# and I was very surprised at the insight I got from learning it (I also read a lot about the CLR and ILASM code as well which helped).
If you want to stay close to the perl community, you could look into Parrot and in particular PASM (Parrot Assembly Language). I know this contradicts what I said before about not bothering with assembly, but hey, life is full of contradicions, and its late :)
Anyway, good luck in your pursuit of knowledge, I personally find programming languages fascinating. And the best part, the more you know the easier it is to learn the next one.
Oh yeah, one last one, SQL. When you really delve into SQL it can be a very interesting langauge, very declarative.
| [reply] |
Re: If Perl was my first language...
by ysth (Canon) on Jul 09, 2004 at 04:14 UTC
|
Assembly language for whatever platform you happen to have. Not for actual use, but just to get a real understanding of how a processor works. | [reply] |
|
And, to follow that up; after you learn an assembly language, I would take a fresh look at C. It will help you see how see how different C idioms correspond to ways to do the same thing in assembly. And, after that, take another fresh look at Perl; it will similarly let you see how different dynamic Perl idioms correspond to some static C idioms. Doing something like that when I learned my first assembly language helped me to a deeper level of understanding, anyways. :)
| [reply] |
Re: If Perl was my first language...
by perldeveloper (Scribe) on Jul 09, 2004 at 10:38 UTC
|
I think it's not a matter of what language to learn but what language to use. Choose the languages as they fit your problem and don't be concerned if you don't get to learn a language you've always thought you'd need to know some day -- wait for the need to arise, if any such need should ever arise (that's why languages die, because nobody uses them, no matter how brilliant or sublime they might seem to their authors).
Of course, if we're not talking about critical life-and-death decisions here, but rather what to do in your spare time, then I would recommend the practical Java or C#.Net, obvious unbiquity candidates in the programming to come (While J2EE might not be so popular, XML Web services are definitely what the world is moving towards). Functional programming (lambda calculus and such) is so theoretical it might grab you too much and make you lose sight of what really matters -- getting things done. I sort of like to look at programming languages as some sort of image or text editor applications... they all help you do the same thing, they all change with time, while the only thing that sets them apart is the interface. | [reply] |
Re: If Perl was my first language...
by Arunbear (Prior) on Jul 09, 2004 at 08:11 UTC
|
So many to chose from:
:-) | [reply] |
Re: If Perl was my first language...
by spurperl (Priest) on Jul 09, 2004 at 07:40 UTC
|
If you need a "second" language in terms of usage, you may be glad to find out that Perl can fulfill all your needs. Especially in a web envorinment - Perl is terrific there.
You may not find Perl sufficient in some rare cases. For instance, if you really need super-efficiency. Then, knowing C or C++ is a good idea. But this is very rare, especially for web needs.
The other monks gave you very good advices about languages to "open your head". Functional languages are terrific, even if you won't use them - they contain a wealth of useful ideas, most of which are implemented in Perl (!!). Learning assembly can help you understand computer architecture, though I wouldn't advice it, unless you need to code for performance. | [reply] |
Re: If Perl was my first language...
by bart (Canon) on Jul 10, 2004 at 10:18 UTC
|
Learn something of a completely different paradigm than the usual — i.e. procedural, for example C and Basic, or you'd be just wasting your time, IMHO. From the top of my head, the forerunners of their own paradigm are the next — for all, there are decent, free implementations:
- functional, prefix: Lisp or Scheme (see the many recommendations in this thread)
- Object: Smalltalk (for example Squeak)
- Postfix, stack based: FORTH
- Logic: Prolog (SWI-Prolog)
- Somewhat related: expert systems (event triggered), for example CLIPS
As a nice generic language, which feels a bit like a descendant from both Smalltalk and Lisp, but with a more procedural-like syntax, take a look at Python.
I can also recommend to take a look at Dr. Dobbs' Journal, which every year brings out a normal issue around alternative programming languages, and occasionally, a dedicated special issue.
| [reply] |
|
| [reply] |
Re: If Perl was my first language...
by jonadab (Parson) on Jul 09, 2004 at 21:02 UTC
|
There are some good options. What do you want to learn?
If you want to enhance your understanding of functional
programming, go for one of the lisp-based languages.
Emacs lisp is useful. Scheme is popular. There's
always Common Lisp, of course. (Someone
will say Haskell, but pick up a lisp-based language
first before you tackle that, IMO.) If you're
more inclined to shore-up your OO, go for Inform or
Smalltalk. There are other options too of course.
Assembly language is interesting to have under your
belt; you won't use it much, but it's good background.
;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print
| [reply] |
Re: If Perl was my first language...
by hmerrill (Friar) on Jul 12, 2004 at 20:24 UTC
|
I second Arunbear's list, but would add my preference for
python and php. In my last job I learned (scratched the surface of) python and grew to like it quite well. I don't believe Python was built to be a web development language, but it certainly can perform in a web environment well. Similar to Perl's "mod_perl" package which builds a perl interpreter right into the webserver process(es), "mod_python" does the same thing with the Python interpreter, so performance is good. Python is not as mature as Perl, but what other language (besides C) is ?? ;-)
It's been a few years since I've used PHP, but when I did I came away really liking it. PHP *was* built to be a web development language from the ground up. The standard PHP installation comes with lots of stuff that other languages like perl require additional packages for, like session handling and more (that I can't recall right now). And, PHP is blazingly fast.
Just my 2c. | [reply] |