Comment

Comment by troglodynellc

It's to distinguish between references and non-references. pass-by-reference rather than only COW (such as in some languages) is quite useful.

You would prefer *ref like in C? You can actually do that (it's a GLOB type).

The place people get tripped up is that $scalar can be a string, or a ref.

You check that easily with ref $scalar eq 'ARRAY' or whatever guard you want.

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton