Hacker News new | past | comments | ask | show | jobs | submit login

    * very first program simply does not work
    * lack of strict
    * lack of warnings
    * lack of my
    * bareword filehandles
    * mentions &-calling of subs
    * thinks it's the same as normal calling
    * snowflake formatting style
    * mentions EXTREMELY outdated books as further reading
    * confuses capitalization of builtins in code examples
    * fails to explain compile phase semantics properly, instead introduces "use" as magical
    * quotes hash keys
    * explains prototypes as something that could be used in general
    * explains post-fix dereference syntax, but describes cumbersome circumfix syntaxes as default
    * 2-arg open instead of 3-arg open

I'm halfway down, i can't be arsed anymore. I feel like i'm reading the Leeds Perl 4 tutorial all over again.



what's funny, i saw the lack of strict and thought...hrmm, well without that we'll see what happens here.


> very first program simply does not work

Guilty. Facepalm. Embarassed. Fixed.

> lack of strict

Not in scope (it's not a tutorial on good Perl), but I'll mention it.

> lack of warnings

Added a general disclaimer in the abstract.

> lack of my

I documented `my` in the subsection on scoping disciplines.

I _tried_ not to use features before I'd introduced them.

And, for most of the "probes," `my` wasn't necessary.

> bareword filehandles

Good point. Added scalar filehandles, as well as how to pass bare words with typeglobs.

Changed most examples to scalar filehandles too.

In doing so, I stumbled across the implicit method invocation form that happens when the first argument to a procedure is an object, so I added an example of that too.

This is exactly the kind of "semantic surprise" that led me to start digging.

> mentions &-calling of subs

Of course.

It's possible, and it can change the semantics of procedure call.

> thinks it's the same as normal calling

I had documented the differences.

Look carefully: The procedure call example includes an error case.

In the parameter passing subsection, I had included a mention of how `&proc` (no args), receives current @_.

> snowflake formatting style

Yep. Definitely not a style guide.

> mentions EXTREMELY outdated books as further reading

I added a link to Modern Perl (as suggested).

And, the new edition of Mastering Perl came out last week. It flipped through it, and it seemed updated.

> confuses capitalization of builtins in code examples

Bug. Fixed.

> fails to explain compile phase semantics properly, instead introduces "use" as magical

Guilty.

I thought about including this in the first revision, but I was nearing exhaustion. I'll add it later.

> quotes hash keys

It's legal.

> explains prototypes as something that could be used in general

I just explain what they are.

They're a part of the language, and they have important consequences for both parsing and interpretation.

> explains post-fix dereference syntax, but describes cumbersome circumfix syntaxes as default

I don't endorse either syntax as default.

> 2-arg open instead of 3-arg open

I'm not trying to document the library, or teach good use, but I added an example for 3-arg.

Thanks for your feedback!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: