Re: Perlmonk Oedipus Complex?
by Corion (Patriarch) on May 04, 2001 at 01:51 UTC
|
Honestly, I can't say that I dislike Windows - it's my desktop operating system of choice, and I have still to meet somebody who can convince me of a better desktop OS (although MacOS X might be a strong contender, if they would get rid of that One-Button-Mouse and the proprietary hardware).
On the other side, I find it quite natural that this site attracts people as regulars who like to use Perl and find it more suited to their tasks than other languages, and there are not many languages better suited to data-wrangling than Perl. There are also many people here who are fluent in several languages, of the programming and of the natural kind, so I think that there is some perspective many people have here.
tillys excellent post and link have made me think a lot about my genesis as a programmer and how the power of the languages I used progressed. I started with BASIC, moved to Pascal, x86 assembly language, Delphi and now Perl and Python (some non-serious sidetracks of DBase, SQL and Java omitted). BASIC was the first programming language available to me.(Turbo) Pascal, being a compiled language, was cool at its time to teach me the basic concepts of code structure, modular design, data structure and scope. x86 assembly language gave me full access to everything. Delphi finally had (enforced) class interfaces. Perl and Python have eval statements that allow me to write code that produces code that gets run, plus all of the other features except being compiled (Python can be compiled).
The next two things on my list are SmallTalk (thanks to merlyn), which seems to stretch farther in the object-oriented section in a sense like Python does already, and what I read from the Second Apocalypse, Perl 6 will also, and LISP, which has a concept called "macros", which seem to be eval statements with syntax checks and full access to the parse tree (which would make self-modifying code much more efficient/easy than raw text manipulation in Perl).
With that evolution in mind, C is far behind me, just like Pascal. I would miss the features Perl delivers to me, C has no eval statement and much of the easy stuff is hard to do in C
(think of copying strings, iterating over arrays and hashes). C to me always combined the advantages of assembly language with the disadvantages of assembly language. So I shun people using C for stuff where I consider Perl better suited for.
PS: tilly tells me that macros are even cooler stuff - they allow you to really modify the parse tree of the whole program, as it seems while it is parsed, so you can implement stuff like Damians Switch module on-the-fly, in the language. And if you're running on a LISP machine, you get native speed as well for your extension.
| [reply] |
|
|
Actually not the whole program.
Here is a brief overview. Take with a grain of salt since
this is coming from someone just learning Lisp (yes, I am
filling in another hole in my programming experience).
And for the many people who do know Lisp, corrections are
welcome...
| [reply] [d/l] [select] |
Re: Perlmonk Oedipus Complex?
by arturo (Vicar) on May 04, 2001 at 01:51 UTC
|
I've seen people refer to using C and Windows almost as if even mentioning them were a type of blasphemy.
About Windows ... if you have to ask, you ain't ever going to get to know ... =) I dislike using Windows in large part because (the versions I've used) are technically inferior (read: crash way too often) and I find the ethics of the people who have made the most profit off of it questionable (keyword: DOJ). But let's leave that aside, if you want to find anti-Windows / Microsoft sentiment, Perlmonks is hardly a seething hotbed of it.
As for this apparent bias against C, I'd like to see examples. I've been here a fair while, and I have no impression of any bias against C. Your average monk is sane enough and wouldn't (e.g.) seriously recommend coding an OS in Perl. But for a lot of jobs, Perl will do them well, and is generally easier to maintain than (say) equivalent C code. Where utmost speed is necessary, go ahead and use C.
My suspicion is that everywhere you've seen distaste for C, the poster in question was either expressing distaste for using it where it's not well-suited (writing a C routine to grab a web page), or joking. In fact, I don't think I've ever seen a serious anti-C claim made *ever* on this site.
| [reply] |
Re: Perlmonk Oedipus Complex?
by chipmunk (Parson) on May 04, 2001 at 01:58 UTC
|
I think that you're making two mistaken assumptions. First, you're assuming that everytime someone says 'such-and-such sucks', they mean it seriously. A lot of it is just old-fashioned posturing. Second, you're assuming that because a user on the site says that such-and-such sucks, the general consensus on the site must be that such-and-such sucks.
I don't think it's true that "Among the highest doctrines of Perlmonks is that the use of Perl and UNIX are superior to almost any
programming language and operating system available." That belief is undoubtedly held by many members of the site, but it's not a tenet of the site itself. :) | [reply] |
Re: Perlmonk Oedipus Complex?
by dws (Chancellor) on May 04, 2001 at 02:21 UTC
|
Why is it that the members of Perlmonks seem to reject the language that fostered the operating system that they hold so dear? Why is it that Perl seems to be considered so much "holier" than C or C++?
For many, many years I coded in C. I've probably written more lines in C (including a C compiler port to a new chip architecture, an optimizing assemler, and a complete chip simulation system) than I will ever write in Perl. And yet I now use Perl for 75% of my personal and professional work. Why? Because C would not be appropriate. C++ even less so. The starting friction for C and C++ is much too high, and I've gotten too old to spend time fighting the language and its environment when I should be spending time fighting the problem. I'll take my garbage collection built-in, thank you very much.
Does this mean I distain C or C++? Hardly. They're the right choice in some situations. And the best of luck to people who choose to place themselves on those situations.
| [reply] |
Re: Perlmonk Oedipus Complex?
by merlyn (Sage) on May 04, 2001 at 01:59 UTC
|
| [reply] |
|
|
Actually, the term Oedipus Complex comes from Freud's theory of development. He believed that a child (a boy) would feel a sexual pull towards his mother and therefore resent the father. (There is a similar complex for a girl, but that is known as an Electra Complex.) Obviously, the parallel isn't perfect in this case (seeing UNIX as the mother and C as the father).
The whole "killing the father to marry the mother thing" came from Sophecles' story Oedipus. In that story (if I remember correctly, it's been a long time), the father learns, from a fortune-teller, that his new-born son will someday kill him and marry his wife. To prevent that from happening, the father gets rid of the child (I really can't remember how). Years later, the father and son meet and the son kills the father in a duel, not knowing that the man was really his father at all. He later marries his mother, not knowing that it is really his mother.
Freud pulled the term from this story, although, it does not actually refer to the act of killing the same-sex parent but rather a resentment towards that parent.
Regardless, I've digressed.
- Sherlock
Skepticism is the source of knowledge as much as knowledge is the source of skepticism.
| [reply] |
|
|
| [reply] |
|
|
| [reply] |
Re (tilly) 1: Perlmonk Oedipus Complex?
by tilly (Archbishop) on May 04, 2001 at 16:08 UTC
|
I am just repeating comments I made in chatter.
Some of what it seems you had interpreted as dislike of C
is not. C is a great portable assembly language. Perl
resembles C in many ways, and it is easy to program Perl
as if it was C.
However programming Perl as if it was C gives you all of
the disadvantages of both languages. C forces you to
manage a lot of low-level stuff and gives you back speed.
If you try that in Perl you will write slow Perl with bug
counts similar to C code. This is not good.
The classic example is the C-style for loop versus the
Perl-style foreach loop. When you code in Perl style you
eliminate the very common off-by-one error, you write less
code, and it will run faster. And since what you write is
very directly what you mean, it is easier to read as well.
So while I have nothing against C, I have a lot against
people coding Perl as if it was C. In fact I think that
as soon as they work on that habit they will find that their
Perl has improved a lot.
When in Rome... | [reply] |
Re: Perlmonk Oedipus Complex?
by yakko (Friar) on May 04, 2001 at 02:01 UTC
|
Why do I prefer Perl to C? This is an easy question... it's chiefly because I was able to learn Perl much faster than C. It's because of its ability to run on many platforms. For the things I do, Perl is almost always the better tool for the job. I work mainly from Unix.
Meanwhile, there hasn't really been pressure for me to learn C, though it's at the back of my mind to get done someday.
As for Windows, I used to use it exclusively. It was the only tool for the computing jobs I did on a PC (I had a few choices on my other platform, the AppleII), until Linux came along. I then replaced Windows with Linux. I was able to build my Linux-specific knowledge to include most any flavour of Unix. Excellent replacement.
Windows still remains a tool that I use, but I only use it when it's best (and even then, there's the virtual way)
--
Me spell chucker work grate. Knead grandma chicken. | [reply] |
Re: Perlmonk Oedipus Complex?
by LD2 (Curate) on May 04, 2001 at 04:55 UTC
|
I think you're making a dangerous assumption here...but anyways, I have nothing against C or C++. In fact, the first language I learned was C++ and I highly enjoyed it ... especially in the Emacs environment. But, as with all languages I've learned through the years I've coded with- each one has it's uses. Perl is not always the language of choice nor is C++ or Delphi or Java or ColdFusion or *insert other languages here*. Each has their advantages and disadvantages and a good developer will choose the appropriate platform and language for the job. | [reply] |
Re: Perlmonk Oedipus Complex?
by petral (Curate) on May 04, 2001 at 23:30 UTC
|
Since it was only mentioned once in this whole thread, I'll repeat:
perl is written in c.
p
| [reply] |
Re: Perlmonk Oedipus Complex?
by frag (Hermit) on May 04, 2001 at 03:26 UTC
|
I've never slammed C vs. Perl (at least, not before this comment) but here's my take.
Like others have said, there's no single best tool; you can only discuss whether a given tool is good in a given context. When people talk about whether a programming language is "good", they probably have a prototypical job in mind that provides the context for their judgement. And I'll wager that we talk about "using Perl", what most monks have in the back of their mind would involve string munging, dynamic manipulation of arrays and hashes. And these are much easier in Perl compared to C. Not impossible, but in Perl it's so easy it's fun; in C, these things are (imho) a chore.
In other words, for my "default programming job", Perl makes C look bad.
-- Frag.
| [reply] |
Re: Perlmonk Oedipus Complex?
by jepri (Parson) on May 04, 2001 at 10:38 UTC
|
I had hated C for a long time before I had even heard of Perl. C was clunky and horrible and looked like line noise (which is a funny accusation given some of the code I've turned out in Perl). The ANSI C compilers couldn't do more than my dear Turbo Pascal could, and looked worse while doing it. Of course, it won anyway.
As for windows, I quite like Win2k, and if they'd just open the source up we could get to work and really make it fly... Thesedays KDE and GNOME are quite nice, especially when you tweak them to work with Enlightenment. ____________________
Jeremy
I didn't believe in evil until I dated it. | [reply] |
Re: Perlmonk Oedipus Complex?
by coreolyn (Parson) on May 04, 2001 at 22:07 UTC
|
In many ways I find just the opposite true. While everyone has there own biases I've found more 'fair' treatment of differing languages (OK PHP seems to have a bad odor around here) there seems to be at more 'use the right' tool philosophy expressed here than other 'non-perl' sites. While there are always those with loud biases I think dislike is a bit strong. It's a Perl site so naturally the bias is to Perl. The sentiments nothing like OS wars.
As for me personally I like Perl over C for sheer speed of development. I can make a script in Perl do what I want faster than I can in C. But if performance or scalability is an issue I go with whatever is the right solution for the problem
coreolyn Did I actually type PHP? Oops I did it again.. gotta go wash my hands *g*
| [reply] |