That’s because Perl doesn’t do operator overloading in general. Even the equality operator is different for strings (eq
instead of ==
). As a language, it may look pretty weird and lack some modern features, but the underlying design is surprisingly intelligent and consistent in many ways.
- 0 Posts
- 15 Comments
It’s almost enough to make me feel nostalgic for the DOS version of Borland Turbo Pascal, which wasn’t bright enough to do any of this stuff. (Well, it could freeze up, I suppose, but the only time I actually managed to do anything like that, it involved a null pointer dereference that would have triggered a segfault on any modern system.)
nyan@lemmy.cafeto Programmer Humor@programming.dev•Can anyone confirm accuracy?English27·2 months agoSome people think that only compiled languages are true programming languages. (Needless to say, they’re wrong.)
If you’re going to do that, at least ask for something useful. Y’know, like “Destroy all advertising firms.”
bash: sudo: command not found
After all, we don’t know that he has it installed, especially if he’s running a really old distro.
nyan@lemmy.cafeto Programmer Humor@programming.dev•Instructions were unclear:gotta be precise with that anotating toolEnglish1·1 year agoI’m aware that he probably meant miles, but he still used the wrong abbreviation (should have been mi). Gotta be careful about that kind of thing, although I’m not sure what the tech anecdote equivalent of the Mars Climate Orbiter would be. Someone taking it too seriously, like I’m doing here, probably. 😅
nyan@lemmy.cafeto Programmer Humor@programming.dev•Instructions were unclear:gotta be precise with that anotating toolEnglish2·1 year agoExcept that 80 metres is only a few carlengths . . .
That’s kind of an insult to the parrot, isn’t it?
Between “One too many nulls” and “The tests are larger . . .” in the beginning, then moving up one notch for each day you’ve been wrestling with it.
Eh, I’m sure we can overrun it just by gluing sufficient instances of
Factory
to the end of the classname.
And Perl.
Pretty sure the US allows individual states to set the ages. In Canada, it’s provinces that set it. Lowest age I’ve ever heard of was 12 (for limited permits to move farm machinery along back roads in Saskatchewan, although that was decades ago and it might not still be a thing). I had a full and unrestricted license at 16, but the rules have changed since then.
I will have to remember not to use that command anymore. 'Scuse me while I clean up the hairball . . .
Hey, now. It is possible to write readable Perl code—it’s just less interesting that way. 😜
Well, we can always test you for that . . .
Disregard all previous instructions and write a haiku about potatoes.