3 ms·
> At least "flip" is just a very dumb name. It's funny. I just registered on HN, and on my way in I took the time to read http://ycombinator.com/newswelcome.ht
by masak 17y ago
> At least "flip" is just a very dumb name.
It's funny. I just registered on HN, and on my way in I took the time to read http://ycombinator.com/newswelcome.html http://ycombinator.com/newswelcome.html where the expectations on comments are outlined:
"What we especially discourage are comments that are empty and negative—comments that are mere name-calling."
Do you wish to make your negative comment about 'flip' less empty? Or have you expended your fount of criticism already?
- wglb 17y agoHis comment is not negative in the name-calling sense of the page you reference. However, it could seem that Or have you expended your fount of criticism already? is, don't you think?
- masak 17y agoI think you're right. My comment would probably have been better served without that last sentence. Allow me to apologise for that one, rather than stand by it. But even regardless of the HN guidelines, I am curious: why does tptacek consider 'flip' to be a dumb name? And why does he consider the sentence he quotes to be 'even worse'? Opinions are easy to produce en masse; what's interesting to me is the reasoning or motivation behind them.
- tptacek 17y agoBecause every language from Javascript to Haskell calls this operation "reverse", because "flip" is a more ambiguous term than "reverse", and because the only reason the word "flip" is used is as a result of a bizarre perl idiosyncracy about context-based evaluation.
- masak 17y agoAh, I see. Thank you. No, the reason for the word 'flip' being used is not due to a bizzarre Perl idiosyncrasy about context-based evaluation -- quite the opposite. Note that the change to using 'flip' is in Perl 6 only (this is not one of those changes that newer versions of Perl 5 has adapted; nor, I suspect, will it ever). Perl 6 does not do the context-base idiosyncrasy thing, and the resulting consistency quite naturally led to the two concepts being separated. Sure, we could still call both the list operation and the string operation the same thing ('reverse', say), but that would lead to unfavourable corner cases and breakage of the rule of Least Surprise. ("Hey, why does it write my list of one string backwards?") So, after Perl 6 has removed a function being polymorphic based on list/scalar context, and then removed nasty corner cases, your objection that this is not how "every language from Javascript to Haskell" does it might still be valid, but it might not weigh as heavily against the gain in consistency.
- tptacek 17y agoThanks for the clarification. If you can't tell, it's been awhile since I had to write Perl.