Java sucks, Perl Rules.

T

Thomas Hawtin

Tassilo said:
As you've said yourself a little later: Things spread slowly. Java
didn't have regular expressions as powerful as Perl's until 1.5 whereas
Perl had regular expressions right from the beginning.

It's much older than that. Java 1.4 had regexs. A number of well known,
free libraries were available before that.
The availability
of certain features and the way they are integrated into a language have
an educational effect on its user base and influence their way of
thinking. Perl programmers are used to be thinking in terms of regular
expressions, sometimes even when the problem at hand is not related to
text-processing at all: A very infamous Perl hacker devised a technique
to use regular expressions for testing if a given number is a prime
number.

Using a domain specific technique as a hammer isn't necessarily a good
thing.
Likewise with Java: Java programmers are used to be thinking in certain
terms of object-orientedness simply because that's the way it has been
done in their language ever since (and this way differs from the
thinking enforced by C++ and Perl because their object-orientedness has
had a different flavour altogether).

OO is not domain specific.
It's about time that certain things sink into the mindset of a Java
programmer: Namely even when a lot of text-processing is involved on the
surface of the source code, this does not necessarily mean that the
program itself is so obviously text-based. I frequently hear Java in
connection with terms such as XML and DOM. This is nothing but
text-processing (in which, incidentally, regular expressions could come
in extremely handy).

Parsing XML with regex is just plain dumb. I've seen Perl programmers
attempt it though.

Because of the limitations of XML you'll often see embedded
mini-languages. In some situations you might want to use regexs for
parsing that, but as a general mechanism for parsing languages it makes
little sense to let them escape from lexical analysis.

Tom Hawtin

(Followups set to: comp.lang.perl.misc, comp.lang.java.advocacy)
 
M

Michael Redlich

Dr.Ruud said:
You are trying to play the man now, so you are trying to lose. Why don't
you succeed?

Dr. Ruud:

No, I am not trying to play "the man." I don't even want to be "the
man." If you want to be "the man," then be my guest.

I just feel that there should be some level of professionalism in a
medium such as this. If one wishes to act childish and foolish, then I
believe the alt.* groups are just the place for that kind of behavior.

Call me old-fashioned or even a fuddy-duddy if you wish, but that's how
I feel. So, get over it...

Mike.

--- ACGNJ Java Users Group (http://www.javasig.org/)
 
J

John Bokma

Michael Redlich said:
I just feel that there should be some level of professionalism in a
medium such as this.

It's just Usenet. What made you think that this is a meeting place for
professionals? Think of it as a pub, or the square in a village.
If one wishes to act childish and foolish, then I
believe the alt.* groups are just the place for that kind of behavior.

You're mistaken.

OTOH, I do agree that Uri's post was weird, and have been wondering if it
was really Uri or a troll.
 
M

Michael Redlich

Hi John:

John said:
"Michael Redlich" <[email protected]> wrote:
It's just Usenet. What made you think that this is a meeting place for
professionals? Think of it as a pub, or the square in a village.

Agreed, but despite the occasional troll and students looking for a
code handout, I find that most people come here with legitimate Java
issues, concerns, questions, and problems. Some of the regulars that
answer these questions seem to be professionals with extensive
experience.

Maybe I feel this way because I facilitate a Java Users Group of my
own. I'm also 44 years old and work for a Fortune 5 company. I guess
that I'm used to being in a professional environment.

I do like your pub or village square analogy.
You're mistaken.

Well, maybe. I remember visiting some of these alt.* groups about ten
years ago, and I remember seeing some outrageous content. Maybe things
have changed??
OTOH, I do agree that Uri's post was weird, and have been wondering if it
was really Uri or a troll.

Uri admitted to trolling in one of his last posts to this thread, but
this whole thread was seemingly started by a troll...

Anyway, I think this whole thing was blown way out of proportion.

Sincerely,

Mike.

--- ACGNJ Java Users Group (http://www.javasig.org/)
 
P

Patrick May

zero said:
You're making my point for me: Java is more verbose. The
fact that you've come up with techniques to avoid some of the
negative consequences of that verbosity indicates just how bad the
situation is.

Perhaps I'm being pedantic, but I think it's very important to make
the distinction between the Java programming language, and the Java
API. [ . . . ]
Anyway, to compare the verbosity of two languages you have to either
compare the language constructs and keywords of each, or compare API
libraries that have the same purpose.

While both of these have an impact on verbosity, what really
matters is the expressiveness of the language. As an example, last
week I had to write some proxies that are drop-in replacements for
some Jini services. The proxies had to catch exceptions thrown when
using remote objects, determine if the exception indicated a situation
that could be recovered from by binding to a different service
instance, and either perform the binding or rethrow the exception.

In Lisp I would have probably used a macro to create the new
language construct I needed, or possibly used :before and :after
methods.

In C++ I would have used templates, possibly with some pointers
to functions.

In Java, because of functions not being first class concepts, its
lack of a macro facility, and its incredibly limited implementation of
generics, I had no alternative but to write a wrapper for each
method, by hand. I reduced the amount of typing by judicious use of
Emacs, but the amount of code that must be maintained is much greater
than it would be with other languages.
As a final note, it shouldn't matter how verbose a language or an
API is (within reason of course). Programming is not typing, no
more than playing chess is the physical action of moving a piece.

I agree with this, as far as creating the software in the first
place goes. The ability to express concepts clearly and concisely in
a language does, however, greatly increase the maintainability of
code. Compared to other languages, Java's verbosity makes it more
difficult for a programmer to understand the structure and purpose of
code.

Regards,

Patrick
 
C

Chris Smith

Patrick May said:
While both of these have an impact on verbosity, what really
matters is the expressiveness of the language. As an example, last
week I had to write some proxies that are drop-in replacements for
some Jini services. The proxies had to catch exceptions thrown when
using remote objects, determine if the exception indicated a situation
that could be recovered from by binding to a different service
instance, and either perform the binding or rethrow the exception.
In Java, because of functions not being first class concepts, its
lack of a macro facility, and its incredibly limited implementation of
generics, I had no alternative but to write a wrapper for each
method, by hand.

Sounds very much like you could have saved yourself a lot of work... and
code... by using java.lang.reflect.Proxy. Reflection looks ugly in Java
and abandons the type-safety provided by the default language (which, of
course, is also abandoned by all the alternatives you mentioned).
Nevertheless, given a large enough task and your desire to accomplish it
in a general-purpose way, it sounds like it would apply.

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
M

Michael Redlich

Dr.Ruud said:
Yes, you were trying to play the man.
http://en.wikipedia.org/wiki/Ad_hominem

Fair enough, but everyone seems to forget that I didn't start this
thread, and all of the Perl folks jumped all over my assessment of
Perl. So, me thinks that all of us (including myself) were trying to
be the man...

I mentioned in a previous post that I didn't claim to be a Perl expert.
I'm definitely not, and all of you guys made it very clear that
there's more to Perl than just regular expressions. Mea culpa, and
consider my wrist slapped. My 2nd edition of O'Reilly's "Learning
Perl" book is dated July 1997, so obviously things have changed
dramatically since then. I believe that Perl 5 had object-oriented
programming support, yes?

And I also never said one language was better than the other. My main
point was that Java shouldn't be compared to Perl because they are
different (again, the apples to oranges comparison).

To me, a programming language should be chosen for its attributes in
how it is a better tool for developing an application.

My offer still stands to Uri Guttman to visit our next Java Users Group
meeting on 2/14 (or any upcoming meeting) since his company is located
near the place where we hold our meetings. The organization that
sponsors all of the user groups use a Perl Users Group as well.

Anywho, I think it's time to put all this mess behind us, and move
forward, don't you think???

Mike.

--- ACGNJ Java Users Group (http://www.javasig.org/)
 
U

umptious

I mentioned in a previous post that I didn't claim to be a Perl expert.
I'm definitely not, and all of you guys made it very clear that
there's more to Perl than just regular expressions. Mea culpa, and
consider my wrist slapped. My 2nd edition of O'Reilly's "Learning
Perl" book is dated July 1997, so obviously things have changed
dramatically since then. I believe that Perl 5 had object-oriented
programming support, yes?

Some people would say that "Learning Perl" aka The Llama aka Schwartz
and Phoenix is a big part of the problem Perl has. Not only doesn't it
cover objects, it skips references. You can think of these as Perl's
equivalent of pointers. Without them you can't construct the equivalent
of C-structs, or write a reasonable function that takes two arrays as
parameters, let alone do something as funky and Pythonesque as
returning two arrays. Try to imagine a C book that did cover pointers
and structs - the Llama book is THAT silly. And unfair to readers, who
aren't warned that such a fundamental topic has been neglected.

This means that anyone who learns Perl from the one of the mostly
highly hyped and community supported Perl books will conclude, quite
reasonably, that Perl is more a life support system for its regexp
system than a language. If he then utters this belief, based on
carefuly reading the book the Perl community told him he *should* read,
he will then be publicly gang-stomped for his ignorance.

By comparison, postponing discussion of objects as an advanced topic is
quite uncontroversial.

Oh, and Perl 5 (which introduced references) shipped in 1994.

And, yes, I expect to get flamed.
 
R

Randal L. Schwartz

umptious> Some people would say that "Learning Perl" aka The Llama aka
umptious> Schwartz and Phoenix is a big part of the problem Perl has. Not only
umptious> doesn't it cover objects, it skips references. You can think of
umptious> these as Perl's equivalent of pointers. Without them you can't
umptious> construct the equivalent of C-structs, or write a reasonable
umptious> function that takes two arrays as parameters, let alone do something
umptious> as funky and Pythonesque as returning two arrays. Try to imagine a C
umptious> book that did cover pointers and structs - the Llama book is THAT
umptious> silly. And unfair to readers, who aren't warned that such a
umptious> fundamental topic has been neglected.

Have you seen the third or fourth edition of Learning Perl?

Have you read the Alpaca book (formerly Learning Perl Objects References and
Modules, soon Intermediate Perl, because we hated the title as much as you
did)?

Have you designed a course curriculum before?

Are you aware of the time constraints of the class that goes with the llama
book and alpaca book?

Are you aware of the huge wealth of programs that can (and are) written
*without* introducing references or objects except in passing?

Our students are happy. They pay our bills. In some ways, the books are
merely a side-effect of how happy we've kept our clients, because there's no
money in books, ever. (If anything, it's a net loss in income, compared to
what we could have put into more trainings or more consulting.)

Yes, it would have been nice for you *personally* to have a tutorial book that
covered what *you* wanted out of Perl. But that's not the way the mass-market
works. We write what works for our clients, and what sells in the
marketplace. You're not alone, but there aren't enough of you to give us
bread on the table. References and objects *are* advanced topics, and that's
why they're in the second book, not the first. Perl *is* useful without them.

print "Just another Perl hacker,"; # and someone who has trained far more people than you ever will
 
B

brian d foy

I mentioned in a previous post that I didn't claim to be a Perl expert.
I'm definitely not, and all of you guys made it very clear that
there's more to Perl than just regular expressions. Mea culpa, and
consider my wrist slapped. My 2nd edition of O'Reilly's "Learning
Perl" book is dated July 1997, so obviously things have changed
dramatically since then. I believe that Perl 5 had object-oriented
programming support, yes?
[/QUOTE]

Remember that you have to substract about a yeare from the date on the
book to get back to when the writing started. At that time, Stonehenge
was just developing the materials to teach objects and references, so
we didn't have enough time to shove that into a book. Both "Learning
Perl" and "Learning Perl Objects, References, and Modules" are based on
our Perl courseware that we teach for a couple of years before we turn
it into a book, and Perl 5 was still fairly new when the writing
started.
Some people would say that "Learning Perl" aka The Llama aka Schwartz
and Phoenix is a big part of the problem Perl has. Not only doesn't it
cover objects, it skips references.

[I think I may be feeding the troll, ... ]

We could have made on giant book, but we were worried about rotator
cuff injuries so we split it up into more than one book, each about 300
pages long. The progression goes from "Learning Perl", which covers the
very basics of the language so readers can write 100 line programs
(including using, but not writing, OO modules), to "Intermediate Perl"
which covers the stuff you say is missing, and then to "Mastering
Perl", which I'm working on right now. I'm sure Java programmers are
familiar with using more than one book (since I used to have quite the
stack of Java books when I was using the language regularly). :)

The stuff you're looking for is currently in "Learning Perl Objects,
References, & Modules", which covers, well, just what it says it does.
This book is about to be re-released as "Intermediate Perl" (available
now for pre-order in many places and due out in March), but it covers
the same stuff and a bit more.

You don't have to buy one of my books to get the information though.
Randal took a big portion of the Alpaca and distributed it with Perl as
the perlboot man page. You can also read about Perl OO in Damian's
"Object Oriented Perl". You could also just get "Programming Perl", a
much more popular book than "Learning Perl" and which covers
everything. Perl isn't suffering from a lack of people writing about
it.

If people are blaming Randal, Tom, or I for something we didn't put in
one of the O'Reilly books, that's fine. We're adults and we can take
it. Don't project what one of us didn't do onto Perl, though.
 
U

umptious

Remember that you have to substract about a yeare from the date on the
book to get back to when the writing started. At that time, Stonehenge
was just developing the materials to teach objects and references, so
we didn't have enough time to shove that into a book. Both "Learning
Perl" and "Learning Perl Objects, References, and Modules" are based on
our Perl courseware that we teach for a couple of years before we turn
it into a book, and Perl 5 was still fairly new when the writing
started.[/QUOTE]

But I understand that references (A Perl 5 feature) as well as classes
still aren't in the THIRD edition. And, of, now there's a FOURTH - and
I still can't see references or classes in the contents.

And the Perl 5 alpha in 1993 surely had references? So Schwartz et al
had four years to add a subject that could be explained in a few pages.

So frankly, your "We didn't have time" excuse seems rather thin to me.
Some people would say that "Learning Perl" aka The Llama aka Schwartz
and Phoenix is a big part of the problem Perl has. Not only doesn't it
cover objects, it skips references.

[I think I may be feeding the troll, ... ]

Then it really is stupid of you to reply, isn't it?

Otoh, smugly labelling anyone whose views you disagree with a troll is
a sign of an emotional age that it still in the lower regions of high
school anyway - so take your choice: emotionally or mentally retarded.
(And thank you for being gratuitously rude in your response - it is so
much easier making one's point against an obvious bore. And fun, too.)
We could have made on giant book, but we were worried about rotator
cuff injuries so we split it up into more than one book, each about 300
pages long.

An attempt at humour!
The progression goes from "Learning Perl", which covers the
very basics of the language so readers can write 100 line programs
(including using, but not writing, OO modules), to "Intermediate Perl"
which covers the stuff you say is missing, and then to "Mastering
Perl", which I'm working on right now. I'm sure Java programmers are
familiar with using more than one book (since I used to have quite the
stack of Java books when I was using the language regularly). :)

I'm sure - as I said - that Java programmers are NOT familiar with the
idea that a language construct needed to do things as simple as

- Pass two arrays to a function

- Create the equivalent of C style structs

- Return tuples containing multiple arrays, etc

should be relegated to an advanced book.* So when they read the
standard and FAQ supported introduction to Perl and they don't find
these things, they reasonably conclude that Perl is a glorified regexp
engine and not much else.

Selling an introductory language book that doesn't cover such
fundamental topics is unique - I can't think of any 300 page
programmers-only book I know that so truncates its coverage of a
language. There is no way that a reader picking up Llama could expect
the crippled coverage you provide. If you want to be fair, I suggest
adding an explicit warning along the lines of "Perl has the equivalent
of C style pointers and structs, but this book doesn't cover them". Put
this on the back cover (and see how many copies the Llama still sells.)
Until then you are letting people down - there is a reasonable
explanation of a programmers-only and FAQ-advertised text like Llama,
and you are not meeting it.

And you are giving non-Perl programmers - often senior ones, like the
guy I was responding to - a picture of Perl that means they will not
use it or hire Perl programmers.
The stuff you're looking for is currently in "Learning Perl Objects,
References, & Modules", which covers, well, just what it says it does.

Yes, I know about the Alpaca book. I also know that references are
covered in eg "Teach Yourself Perl in 24 Hours" (the book I bought for
my biochemist girlfriend) along with modules and classes, and that the
book is perfectly usable by someone who has never programmed before.
Otoh, web tutorials like Perl In 20 pages cover references (etc) quite
adequately in a brisk treatment suitable for professionals. So why the
devil should *anyone* read Llama?

I also know that I could give a junior programmer a copy of Learning
Python to skim, and the next day ask him to hack out an implementation
of the Markov chain program that Kernighan and Pike use as a short
language comparison benchmark in The Practice Of Progamming. If I gave
another guy Learning Perl, he *wouldn't* be able to do this - in fact,
he might conclude it's impossible to code a decent solution. Which
language do you think would get chosen for a project? Do you think this
could have anything to do with the fact Perl is now seen to be a
language with its market share in decline, with the boring jobs going
to PHP and Java, and the interesting ones going to Java and Python and
Ruby?

Perl is a somewhat harder language to use than Python or Ruby. Making
it seem very much less powerful too is probably a big mistake.

I strongly suggest to the Perl community that at the very least the FAQ
notes in its coverage of Llama that it *is* missing references, and why
this matters, and mentions that some other introductory books do cover
this material. As things stand, Llama is your ambassador to the rest of
the programmer world - including the people who give you jobs - and it
is making you look bad, and almost certainly costing you money and
jobs.


* Or an advanced language course. Let's see how much it would cost to
learn to write a function that could take two arrays as parameters
using Stonehenge training courses:

Llama course: $2000 + 4 days x $3500 => $16,000

Alpaca course: $2000 + 3 days x $3500 => $12,500

Total: $28,500.

Plus about two weeks wages, taxes and overhead for the people you send
on the course - so, reasonably, $60,000 dollars to get 10 people
trained to write a script that kid with the Python book wrote on his
second day - probably before lunch.

Otoh, most of your competitors (some of them authors of much more
impressive books than Llama, but let's not drag them in to this by
name) cover the Llama *and* Alpaca material in their introductory 4 or
5 days courses.
 
B

Bernard El-Hagin

But I understand that references (A Perl 5 feature) as well as
classes still aren't in the THIRD edition. And, of, now there's a
FOURTH - and I still can't see references or classes in the
contents.


But now there's a sequel to "Learning" that discusses those topics. I thought this was fairly obvious
from what Randal and brian wrote, but I don't mind giving slower people an extra nudge when
they clearly need it. You're welcome.

And the Perl 5 alpha in 1993 surely had references? So Schwartz et
al had four years to add a subject that could be explained in a
few pages.


You conveniently ignored Randal's response to this. I'm not surprised, mind you, I'm just pointing
it out.

So frankly, your "We didn't have time" excuse seems rather thin to
me.


You are confused. You seem to think that anyone but you cares what *you* consider to be a "thin
excuse". Forgive me, but that makes me want to chuckle nonchalantly.


/me chuckles nonchalantly

Some people would say that "Learning Perl" aka The Llama aka
Schwartz and Phoenix is a big part of the problem Perl has. Not
only doesn't it cover objects, it skips references.

[I think I may be feeding the troll, ... ]

Then it really is stupid of you to reply, isn't it?


Well, he did give you the benefit of the doubt (hint: the words "may be" gave this away. Again, a
nudge for you, since you seem to need it). In hind sight, I agree, giving you the benefit of the
doubt *was* stupid.

Otoh, smugly labelling anyone whose views you disagree with a
troll is a sign of an emotional age that it still in the lower
regions of high school anyway - so take your choice: emotionally
or mentally retarded.


Hmmm, that's a tough one. I haven't seen too many of your posts, but if I had to
choose...hmmm...let's see...aww hell, I think you're both.

(And thank you for being gratuitously rude in your response
- it is so much easier making one's point against an obvious bore.


This implies that rude people are boring. That's not logical. It also implies that making one's point
is easier if the point being made is one not shared by a boring person. Again, this makes
no sense.


As far as rudeness goes, *you're* the one that started with a chip on his shoulder. There's
*nothing* rude in brian's post. Yours, on the other hand, have been full of vitriol.

And fun, too.)


This implies that you would find playing basketball against a person with one leg more fun than
playing against a physically fit opponent. *tsk tsk*

An attempt at humour!


And a response to your tantrum, but I guess you missed that.

I'm sure - as I said - that Java programmers are NOT familiar with
the idea that a language construct needed to do things as simple
as

- Pass two arrays to a function

- Create the equivalent of C style structs

- Return tuples containing multiple arrays, etc

should be relegated to an advanced book.*


You are confused again. You seem to now think you are the spokesperson for all Java
programmers.

So when they read the standard and FAQ supported introduction to
Perl and they don't find these things, they reasonably conclude
that Perl is a glorified regexp engine and not much else.


Why are you doing these people a disservice by basically stating that they're morons incapable of
thinking for themselves? Could it be that it is *you* who is the moron incapable of thinking for
himself?

Selling an introductory language book that doesn't cover such
fundamental topics is unique


*You* think it's a fundamental topic. Again, *you* are irrelevant. Get used to it.

- I can't think of any 300 page programmers-only book I know that so
truncates its coverage of a language. There is no way that a reader
picking up Llama could expect the crippled coverage you provide.


*Any* book on *any* language is crippled to some extent.

If you want to be fair, I suggest adding an explicit warning along
the lines of "Perl has the equivalent of C style pointers and
structs, but this book doesn't cover them".


If *you* want to be fair realise that references are *not* the equivalent of C style pointers.
There's a very real *need* for pointers in C. There's a much less pronounced need for references
in Perl *especially* at the level "Learning Perl" is trying to teach.


Put this on the back cover (and see how many copies the Llama still
sells.)


Why stop there? Why not put *every* feature of Perl that is omitted on the back cover? Oh, wait, I
know this one - because it would be STUPID.

Until then you are letting people down - there is a reasonable
explanation of a programmers-only and FAQ-advertised text like
Llama, and you are not meeting it.


Again, this is *your* opinion.

And you are giving non-Perl programmers - often senior ones, like
the guy I was responding to - a picture of Perl that means they
will not use it or hire Perl programmers.


This is absurd even for you.

Yes, I know about the Alpaca book. I also know that references are
covered in eg "Teach Yourself Perl in 24 Hours" (the book I bought
for my biochemist girlfriend) along with modules and classes, and
that the book is perfectly usable by someone who has never
programmed before.


You mean the "Teach Yourself Perl" that has 480 pages, versus Llama's 300? Puhleeze.


Otoh, web tutorials like Perl In 20 pages cover
references (etc) quite adequately in a brisk treatment suitable
for professionals. So why the devil should *anyone* read Llama?


Because it's not for the same people that those 20 page _references_ are for. This should be
obvious even to you.

I also know that I could give a junior programmer a copy of
Learning Python to skim, and the next day ask him to hack out an
implementation of the Markov chain program that Kernighan and Pike
use as a short language comparison benchmark in The Practice Of
Progamming.


"Learning Python" is 620 pages.

If I gave another guy Learning Perl, he *wouldn't* be
able to do this - in fact, he might conclude it's impossible to
code a decent solution.


Even if this were true, are you saying that a programming tutorial after which one is not able to
"hack out an implementation of the Markov chain program" worthless? Are you really that biased?

Which language do you think would get chosen for a project?
Do you think this could have anything to do
with the fact Perl is now seen to be a language with its market
share in decline, with the boring jobs going to PHP and Java, and
the interesting ones going to Java and Python and Ruby?


Statistics, please. Oh, you have none? I didn't think so.

Perl is a somewhat harder language to use than Python or Ruby.
Making it seem very much less powerful too is probably a big
mistake.


Whew, lucky no-one worth listening to is doing that, then.

I strongly suggest to the Perl community that at the very least
the FAQ notes in its coverage of Llama that it *is* missing
references, and why this matters, and mentions that some other
introductory books do cover this material.


The way this is handled in the FAQ can only be seen as inadequate by a complete moron:


"perlfaq2"
---------------
If you're already a seasoned programmer, then the Camel Book might suffice for you to learn Perl
from. If you're not, check out the Llama book:

Learning Perl (the "Llama Book")
by Randal L. Schwartz and Tom Phoenix
ISBN 0-596-00132-0 [3rd edition July 2001]
http://www.oreilly.com/catalog/lperl3/

And for more advanced information on writing larger programs, presented in the same style as the
Llama book, continue your education with the Alpaca book:

Learning Perl Objects, References, and Modules (the "Alpaca Book")
by Randal L. Schwartz, with Tom Phoenix (foreword by Damian Conway)
ISBN 0-596-00478-8 [1st edition June 2003]
http://www.oreilly.com/catalog/lrnperlorm/
---------------


If, from this, you can't deduce that Llama does not sufficiently talk about references, then you are a
fool.

As things stand, Llama
is your ambassador to the rest of the programmer world - including
the people who give you jobs - and it is making you look bad, and
almost certainly costing you money and jobs.


Statistics, please. Oh, you have none? I didn't think so.

* Or an advanced language course. Let's see how much it would cost
to learn to write a function that could take two arrays as
parameters using Stonehenge training courses


What contemptible (lack of) logic. You conveniently forgot to mention _everything else_ that you
learn for the quoted sums of money.
 
F

franzferwelsh

Randal said:
print "Just another Perl hacker,"; # and someone who has trained far more people than you ever will

Randal L. Schwartz is also "Just another Convicted Felon,"; # convicted
of knowingly accessing and using a computer and computer network for
the purpose of committing theft
 
P

Patrick May

Chris Smith said:
Sounds very much like you could have saved yourself a lot of
work... and code... by using java.lang.reflect.Proxy. Reflection
looks ugly in Java and abandons the type-safety provided by the
default language (which, of course, is also abandoned by all the
alternatives you mentioned). Nevertheless, given a large enough
task and your desire to accomplish it in a general-purpose way, it
sounds like it would apply.

I did consider using reflection, but in practice it wouldn't have
resulted in significant code reduction given the variable number of
arguments, different return types, and variations in behavior required
by each method wrapper. It would also decrease understandability and
maintainability -- as you noted, reflection looks pretty ugly.

Regards,

Patrick
 
1

1usa

Randal L. Schwartz is also "Just another Convicted Felon,"; # convicted
of knowingly accessing and using a computer and computer network for
the purpose of committing theft

And this coming from an anonymous coward hiding behind a hotmail
account.

Randal Schwartz's ordeal is well documented. When I stumbled upon it
long, long time ago I read with interest and horror.

Such are the consequences of being so much smarter than the people
around you that they cannot even begin to understand the difference.
Reading newspaper accounts of the trial via Lexis a long time after the
fact, I was reminded of the prosecutor in "My Cousin Vinny".

Sinan
 
L

Luke Webber

And this coming from an anonymous coward hiding behind a hotmail
account.

Randal Schwartz's ordeal is well documented. When I stumbled upon it
long, long time ago I read with interest and horror.

Such are the consequences of being so much smarter than the people
around you that they cannot even begin to understand the difference.
Reading newspaper accounts of the trial via Lexis a long time after the
fact, I was reminded of the prosecutor in "My Cousin Vinny".

To be fair, Schwartz was blindingly stupid to do what he did without
first securing permission. Though it was insanely bloody-minded and
counter-productive for his employers to pursue him the the extent that
they did.

Really, as cautionary tales go, Schwartz's story ranks right up there
with "Never put out a campfire with your face". It's a damned shame that
it turned out the way it did for him, but I can't really put myself in
his place, as in "there, but for the grace of God, go I". I don't think
I'd ever be that stupid.

Luke
 
U

umptious

Luke Webber wrote: >> To be fair, Schwartz was blindingly stupid to do
what he did without
first securing permission. Though it was insanely bloody-minded and
counter-productive for his employers to pursue him the the extent that
they did.<<

Both these things are true. But - as I'm sure LukeW agrees - simply
calling Schwartz, as one poster did, "Just another convicted felon" is
blindingly unfair, just as it wold be unfair to refer to a journalist
jailed for shielding his sources in this way, or a political protestor
arrested at a demonstration. Like these people, Schwartz acted from
atypically altruistic motives which have to be noted.

However, this doesn't excuse his wasting two days of my life with that
dreadful book, or providing the Python and Ruby people competing for
your jobs with the best help they could imagine.
 
A

axel

In said:
Some people would say that "Learning Perl" aka The Llama aka Schwartz
and Phoenix is a big part of the problem Perl has. Not only doesn't it
cover objects, it skips references. You can think of these as Perl's
equivalent of pointers. Without them you can't construct the equivalent
of C-structs, or write a reasonable function that takes two arrays as
parameters, let alone do something as funky and Pythonesque as
returning two arrays. Try to imagine a C book that did cover pointers

I presume you meant to say "didn't".
and structs - the Llama book is THAT silly. And unfair to readers, who
aren't warned that such a fundamental topic has been neglected.

Perl and C are fundamentally different languages, especially for
example in their approaches to arrays (including strings). Pointers
are very much required in C to do array manipulation. In Perl
however one can quite happily expand arrays, unshift data to the
start of an array or splice material into the middle of an array
by just using built in functions without any requirement for
references or thoughts of the mechanics of memory allocation.

Such array manipulation features combined with hashes obviates the
need for objects in many cases where C would require structures
and pointers.

To take a trivial example... you have data in the format of a unix
password file and wish to sort, modify, or print different fields.
In C one would automatically think of using an array of structures,
each structure containing an individual entry. Pointers would be
required. In Perl, a simple array of scalars would be sufficient
without any use of references whatsoever (or, if a field such as
'username' was unique to each entry, a hash of scalars).

Thus in teaching the basics of these languages, it is horses for
courses.

Axel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top