3 ms·
So what in perl made it conductive to that kind of coding? I never worked with perl much but back then I got the impression perl being line-nose or whatever was
by htns 10y ago
So what in perl made it conductive to that kind of coding? I never worked with perl much but back then I got the impression perl being line-nose or whatever was more legend than reality. Perl's not a different paradigm like APL.
And by references I meant exactly that perl is not pass by reference, unlike just about any other scripting language. R is the only other popular one I can think of that's not. There's shell too but it doesn't count.
- Smaug123 10y agoPython's not pass-by-reference either!
- falcolas 10y ago> So what in perl made it conductive to that kind of coding? "Because I could" More specifically, in very short programs, the shortcut values were actually valuable, and the mental overhead for interpreting them in short subroutines or programs was minimal. The problem is that programs don't stay static, and that single time-saving shortcut becomes two, then four, then eight, then... Soon, it's an absolute mess. Even once I realized the cost, I had to follow the coding conventions of those who had come before, at the cost of increasing the cognitive overhead even further. A self-reinforcing loop. > not pass by reference, unlike just about any other scripting language As Smaug says, Python is pass by value. The trick is that the value is always a reference to an object, or more specifically “pass-by-object-reference” (“Object references are passed by value."). This causes a few subtle behavioral inconsistencies, such as the dreaded `def a(b=[]):` bug.
- htns 10y agoI'm way late to reply, but I never really understood what would qualify as pass by reference according to that logic :D you do have to pass a value eventually, it can't be references all the way