
The taming of the newbie - a comedy on IRC  - draegtun
http://use.perl.org/~masak/journal/40110
======
10ren
In C, parentheses mean expression grouping, function invocation and cast...
depending on context.

In English, many words have different meanings depending on context: e.g. not
to be mean, but you know what I mean, right? Ordinary human speakers have no
problem with this, even without theoretical linguistic training.

I'm not convinced that Larry Wall (a formally trained linguist) has chosen
meanings and contexts that really do fit in with what human speakers
intuitively expect. But it could well be that it is just that I am personally
familiar with C-style grammar, and not with Perl's. If I "grew up" with Perl,
perhaps it would seem natural?

Perhaps it's exactly the same as with human languages: that languages with
very different grammars are not so easy to learn for most people. And...
perhaps there is a linguistic window for learning programming languages, as
there is for human languages (which is up to about 7yo)?

~~~
tptacek
No, they mean different things depending on _syntax_. (char *) is never a
function invocation.

~~~
10ren
I was picturing an AST, with the parentheses in the _context_ of that.
However, you're quite right that _context_ seems to have a specific technical
meaning here, and not the general one I was using.

------
nfnaaron
Interesting post about perl, but the end is most interesting about Life In
General:

"But I guess there's also a moral to it all. We all start somewhere, and in a
way it's reassuring to find five-year old proof of this fact. A newbie is just
on a part of the learning curve you've already visited; they haven't had a
chance to tweak their keyboard and developing environment to maximum
efficiency yet, and they sometimes forget that the manual is there, or misread
it in some way. So, don't hesitate to be be kind to them, and help them
connect to the goodness that is perldoc, PerlMonks and Planet Iron Man so that
they can grow and bloom into experienced wielders of Perl.

But don't hesitate to call them insane, either, when the situation calls for
it."

The only thing missing from Life In General is The Fine Manual.

~~~
liquidben
Reminds me of the mantra I repeat to myself whenever I start going to the gym
again:

"Everybody's got to start somewhere"

~~~
nfnaaron
And that reminds me of an observation I made after going to the gym for a few
months (and that after doing nothing for 30 years) :

I'm not good at anything, but I'm better at everything.

------
RyanMcGreal
> nowadays we have flip for strings, reverse for lists, and invert for hashes

That seems utterly insane.

~~~
perlgeek
It follows Perl's philosophy very closely.

As an example: in Javascript, the binary + operator means either addtion or
concatenation, depending on the type of the left-hand side. In Perl there are
different operators for that, + for addition and . for concatenation.

That means that you have more operators, but you need less type conversions,
because they happen implicitly.

This now follows the same philosophy: different operations have different
names. List reversal is not the same as string reversal. Neither is hash
inversion.

Within this context it's the most logical thing you can do.

~~~
tptacek
Wait, nothing you just said makes renaming "reverse" "flip" more logical.

~~~
masak
Sir, I have a frivolous data point for you. It's from a blog post I wrote
shortly after the change from 'reverse' to 'flip' for strings
(<<http://use.perl.org/~masak/journal/38800> >):

"Strangely enough, nothing happened when clicking the 'flip!' link... a
moment's reflection gave the cause of this: a few days ago, [Larry Wall] has
syntactically separated reversal of List (.reverse) from the reversal of Str
(.flip); my code was like three weeks old and was still using .reverse for
strings, which in the newest Rakudo got interpreted as one-elem lists, and
list-reversed with no visible effect whatsoever. I fixed that, and found the
fact that the link in the Lobster app was already called 'flip' an indication
of the appropriateness of the name change. Perl 6 just keeps getting nicer and
nicer."

The relevant piece of background is that I was porting the example application
(Lobster) from the Rack framework, where the link was already called 'flip'.
So, suddenly both the link and the method were called 'flip'.

------
malkia
Then I should no wonder I cannot program in Perl, and stick with Lisp, Lua,
JavaScript & C.

~~~
masak
Perl 5 has many other sides apart from the context-dependence. To mention a
few, the regex sublanguage is deeply integrated into the rest of the language,
there's an active and versatile testing culture, and CPAN hosts 17k modules
for countless of fields and applications.

Some of those (such as testing culture) are mirrored in other languages'
cultures, others (such as CPAN) are unparalleled in scope. Ignoring Perl 5
based on a single feature causes you to miss out on all the truly good parts.

