4 ms·
> derefs of complex data structures Am I the only one who finds perl data structures simple and consistent? Once I understood the difference between () and []
by ryl00 7y ago
> derefs of complex data structures
Am I the only one who finds perl data structures simple and consistent? Once I understood the difference between () and [] (or {} for hashes), it was easy (too easy, some might say!) to construct complex data structures.
- tyingq 7y agoCould partially be the TIMTOWTDI thing. People mixing: $foo->{bar}; $$foo{bar}; And quoting or not the key, etc. Slices and individual elements, etc. Probably looks like line noise to outsiders when you have a long one using parens to grab a specific array element, combined with $$ and so forth.
- WorldMaker 7y agoPlus many years of Bash script intended one-liners to replace or augment awk/sed leading a lot of Perl Golfers to a sublanguage that makes APL look far saner in comparison. That the code golf then shows up in "production scripts" and libraries (if for no other reason than muscle memory) builds a fortress wall to readability by outsiders.
- devurand 7y agoWhen I started to learn other languages after learning bash then Perl first, I was really dismayed at how clumsy it was to build up a data structure of any complexity. So verbose in the Java/C++/C# land. Having those constructs so effortlessly available with a minimal amount of syntax spoiled me. To this day, I would likely still prefer to do any kind of complicated ETL involving deeply nested structures with Perl.