Re:Why ['1', '7', '11'].map(parseInt) returns [1, NaN, 3] in...
by sametmax on Friday June 21, 2019 @03:41PM
(#20245709)
The most famous JS template engine of the early 2000 used to be literally called "mustache" because of it:
Re:Why ['1', '7', '11'].map(parseInt) returns [1, NaN, 3] in...
by jacobolus on Friday June 21, 2019 @08:59PM
(#20247381)
Your reply continues the trend of factual sloppiness. Mustache is not the “most famous”, not “JS”, and not “of the early 2000[s]”.
Mustache is a Ruby library from 2009. Here’s the first commit https://github.com/mustache/mustache/commit/6ee6bcf21d381554...
But more to the point, someone calling their template library “mustache” because a curly brace has a vaguely mustache-like shape doesn’t remotely imply that people regularly call curly braces “mustaches” or would have any idea what “mustache” meant in the context of someone pronouncing their computer code.
Obviously occasional people are going to pick up terminology from other communities, and the name “splat” has been gaining popularity recently (I had literally never heard that term before a few years ago, and have been writing Python code since 2002). I occasionally hear British expats in the USA calling elevators “lifts” or baby carriages “prams” or lines of people “queues”. Doesn’t mean those have been common American terms.
This was certainly not called the “splat operator” “forever” as claimed in the previous comment.
> I call curly brackets "mustaches" all the time
I have never heard anyone call these “mustaches”. The common terms are “curly brackets” and “braces”. Nobody is going to have any idea what you are talking about.