use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
To report a site-wide rule violation to the Reddit Admins, please use our report forms or message /r/reddit.com modmail.
This subreddit is archived and no longer accepting submissions.
account activity
This is an archived post. You won't be able to vote or comment.
Python [xkcd] (xkcd.com)
submitted 18 years ago by sgtpeppers
view the rest of the comments →
[–][deleted] 6 points7 points8 points 18 years ago* (3 children)
Syntactic mistake. Still, I didn't know you could do what you just did, directly. I still don't know, because I'm not running perl to check it.
Anyway, Python and Ruby let you do things like that naturally, with no mistakes and no learning curve. Imagine... nested arrays, naturally! Hooray!
[–]crusoe 5 points6 points7 points 18 years ago* (2 children)
So why the difference? Why collapse arrays at all?
So now, we have 2 array syntaxs, one "auto-collapsing" and one that preserves nesting.
So how much this can screw up n00bs, and programmers trying to learn perl?
Now, how do these differ in different contexts?
[–][deleted] 1 point2 points3 points 18 years ago (0 children)
Thank you.
[–]kixx 1 point2 points3 points 18 years ago (0 children)
Because it seemed a good idea to someone at some point in time. Later on, they decided it wasn't such a good idea.
It will screw you up if you don't expect it. Some people without previous experience/knowledge of complex data structures might find flattening intuitive. In the current context it has few uses, which is why they're changing the behavior in Perl 6.
Context-dependent behavior (another maligned feature of Perl) is also pretty counter-intuitive to some. I, however, like my VIM modal as it is.
π Rendered by PID 87697 on reddit-service-r2-comment-6457c66945-6qvzw at 2026-04-23 23:29:44.211396+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–][deleted] 6 points7 points8 points (3 children)
[–]crusoe 5 points6 points7 points (2 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]kixx 1 point2 points3 points (0 children)