From: Ron Garret on
In article <ho3gp5tm4tspivfq1vj3idcdancc2c1r23(a)4ax.com>,
J?rgen Exner <jurgenex(a)hotmail.com> wrote:

> >> > What do the curly braces denote?
> >>
> >> Depends on where they are used. Some common uses include enclosure of
> >> code block (perldoc perlsyn) and indexing of hashes (perldoc perldata).
> >
> >Yes, that is exactly the problem. Perl is not content with assigning
> >semantics meaning to every single symbol on the keyboard, it *overloads*
> >those symbols, so even if you *could* look them up you *still* wouldn't
> >know what they meant without first deciphering the context.
>
> You mean like lead and lead in English? Or + and + in C which, gasp, can
> be used for char, short, byte, int, long, float, pointers, and a myriad
> of others?

Yes. Exactly.

> >> > What is /\d/?
> >>
> >> perldoc perlre:
> >
> >And how is one supposed to know that "perlre" is the right thing to look
> >up here?
>
> Because you were looking at a function who's first argument is a regular
> expression

And how am I supposed to know that if I don't know Perl?

> >And why on earth would I want to do that? No, seriously, what's the
> >payoff? That is not a rhetorical question. What will I be able to do
> >if I invest effort into learning and/or improving Perl that I cannot do
> >just as easily and just as well in, say, Python?
>
> True, for you it would be a major drawback because you couldn't rant
> about it any longer.

Yeah. That would really suck. What would I do for fun?

> [...]
> >> >Except that it doesn't. It distinguishes between scalars,
> >> >lists, and hash tables, but not between integers, floats, and strings.
> >>
> >> Why would you want to distinguish between them on such a low level?
> >
> >Why would I want to distinguish between types at all?
>
> So are you suggesting that e.g. C's distinction between short, byte,
> char, int, long, unsigned, double, ultra-special-extra-big .... would be
> even better?

No. Of course not. Don't be ridiculous.

> Typing is an aid to the programmer to avoid errors by inadvertently
> using incompatible data types.

Typing *would* be an aid to the programmer if Perl actually prevented
you from using incompatible types. But it doesn't, e.g.:

print "a" + "b";

Defensible results include producing an error or outputting "ab". But
not outputting 0, which is what it actually does.

And while I'm at it:

%x=123;
print %x;

Shouldn't that be an error? It isn't. It prints 123. So does this:

@x=123;
print @x;

This is actually legal perl program:

print $(,$);

There are dozens and dozens of these obscure punctuational shortcuts:
$], $@, %!, $:, $^, %-, $^P, @F, @_, it goes on and on.

I'm sorry, but this makes my skin crawl.

rg
From: ccc31807 on
On Mar 10, 7:19 pm, Tamas K Papp <tkp...(a)gmail.com> wrote:
> > That's right. There isn't anything horrible or abominable in either of
> > the two languages. It certainly wasn't my intention to create that
> > impression, just to opposite in fact.
>
> So when you said "ignoring the horribleness and the abominable in
> another language because you do understand it", what another language
> were you referring to?  Perl, CL, or something else?

I used the same words that RG used, which were, and I quote: "Perl is
just an ... abomination through-and-through. ... It was just
horrible." I wasn't referring to any particular language, but to the
descriptive lwords used. You might make a credible case that a
particular language is horrible, and support your argument with logic
and specific examples, but RG did not seem to do so. Instead, he
seemed to be making his argument from simple prejudice and ignorance.
I was pretty specific in stating that you can't judge a language
without knowing something of the substance of the language, and quite
frankly, I'm at a loss to see how you missed the main point.

> When you made a statement about "ignoring the horribleness and the
> abominable in another language", I thought you meant Common Lisp.  Did
> you mean Perl?

I didn't mean ANY particular language -- I meant the process of
characterizing a language the way RG did based on reading a few
chapters of an anonymous book. In the same way, I took it as fact that
someone who expresses prejudice AGAINST something would also express
prejudice TOWARD something else based on familiarity.

Over the years, I've had some interaction with students and graduates
of business and management departments of colleges and universities.
These departments have IS or MIS majors and programs, and they
typically use Microsoft technologies, such as Windows and Visual
Basic. As a result of their indoctrination, they sometimes believe
that Visual Basic is the highest and best programming language, and
that all other languages are inferior. I have had one experience (not
personal, but vicarious) of a manager taking over a unit of a large
financial services firm and decreeing that from thenceforth all new
development would use Windows, and MS tools, and that all existing
processes would be converted. This notwithstanding the fact that the
cost per transaction of the existing processes (Unix based) was about
twenty percent of the cost of the existing MS units and that the
conversion would entail substantial costs.

WRT Perl, I agree that it's an ugly, convoluted, write once read never
language, but it's popular, and it's popular for a reason. It's
popular despite the fact that it's not taught in school, or in
extension classes, or is on anyone's official list of approved
technologies. Personally, I can tell you that it's a very good match
for my job, better than any language I've had personal experience with
(and I've studied and or learned about a dozen languages in my
career.) I'm also making an effort to learn CL and achieve some
proficiency in CL. My feeling so far is that CL is a more powerful
language than Perl but not as suited to my job.

Here's the point: Don't disparage a language before you know it, and
don't rely on ignorant bias to disparage a language.

CC.
From: Tad McClellan on
["Followup-To:" header set to comp.lang.perl.misc.]

Ron Garret <rNOSPAMon(a)flownet.com> wrote:


> %x=123;
> print %x;
>
> Shouldn't that be an error?


And how are you supposed to know that if you don't know Perl?

(it does generate a warning, and all Real Perl Programmers enable warnings)

perl -we '%x=123; print %x;'

Would you think that printing 123 is reasonable if %x meant an array?

How do you know that it doesn't mean an array if you don't know Perl?


> It isn't. It prints 123. So does this:
>
> @x=123;
> print @x;


How do you know the percent-sign means anything different than at-sign?

Trying to understand a language (machine or human) that you do
not know is futile. You must either give up, or actually learn
the language.


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
From: Ben Morrow on
[F'ups set to clpmisc]

Quoth ccc31807 <cartercc(a)gmail.com>:
>
> WRT Perl, I agree that it's an ugly, convoluted, write once read never
> language,

No. No No No. *Your* Perl may be, but don't tarnish the rest of us with
the same brush. It's perfectly possible to write readable Perl; indeed,
IMHO, it's wasier to write readable Perl (with a little effort) than
most other languages.

> Here's the point: Don't disparage a language before you know it, and
> don't rely on ignorant bias to disparage a language.

The point you seem to be missing is that there *are* valid grounds for
calling Perl ugly. Ron Garret seems determined to miss them in favour of
complaining about too much punctuation, but they are there and they will
bite you hard if you stumble across one without knowing it's there. It
helps, in practice if not in theory, that the common convention of
function/Package/FILEHANDLE makes collision between those unlikely.

Ben

From: Ron Garret on
In article
<5a67c5c1-22a1-458e-8c5c-21b97d95bb4a(a)z11g2000yqz.googlegroups.com>,
ccc31807 <cartercc(a)gmail.com> wrote:

> WRT Perl, I agree that it's an ugly, convoluted, write once read never
> language, but it's popular, and it's popular for a reason.

Sarah Palin is popular too.

rg