4 ms·
I actually don't mind Perl's type indicators which show up in front of variable names, as it makes it clear throughout the code what you are working with (this
by BrandonM 19y ago
I actually don't mind Perl's type indicators which show up in front of variable names, as it makes it clear throughout the code what you are working with (this coming from someone who rarely uses Perl anymore).
- halo 19y agoThe 'problem' with Perl's type indicators are that it's slightly unintuitive to, say, create a hash using %, but to access a hash (and return a variable) you use $, so the punctuation indicates the return type rather than the type you are accessing and might not make sense without context. Whatsmore, it requires you to remember two things - the type of brackets required and the return type, one of which is largely redundant. Incidentally, I'm pretty sure they're changing this with Perl 6 and making it to that the symbol indicates the type you are accessing. I'm split as to whether this is a good idea or not, especially as they're retaining the still largely redundant curly brackets when ordinary brackets will now do.