5 ms·
Yes, but again that's the consequence of another bad design: not including spread or another metaprogramming system for this. And not having default values eith
by sametmax 7y ago
Yes, but again that's the consequence of another bad design: not including spread or another metaprogramming system for this. And not having default values either.
Spread has existed in Python forever under the name of "splat operator", default values as well. Same with ruby.
That what I meant when I said "they accumulate". A bad design decision not only affect the user cognitive load and productivity, but it also cascades to the rest of the language and shapes it.
- o_nate 7y agoWhenever I learn about another of these Javascript foot-guns, I come away with a greater sense of awe at the relentless good sense that went into the design of Python. Not sure if it's a kind of super-human Dutch ability to foresee ramifications of design decisions, or if it's just that Python developed organically over a period of time with healthy feedback from smart and invested users.
- sametmax 7y agoIt's also about the ability to say "fuck off". People came at Guido relentlessly for adding new features, debating his decisions, trying to change the philosophy and aesthetic of the language. The guy stood up to them for 20 years, staying polite but resolute at doing things his, at the time controversial, way. To me, that's even more impressive than being a good language designer.
- jacobolus 7y ago> in Python forever under the name of "splat operator" The name “splat” is not commonly used in Python. That name comes from Ruby (or Perl?). In Python it is usually called “star” or similar.
- sametmax 7y agoBoth are used. Here you can see Steven D'Aprano, one of the dev of the Python stdlib, naming it "splat": https://mail.python.org/archives/list/python-ideas@python.org/message/4IYAQPAYBQ4QGIXAJ6BSGM6OFR6IMEKT/ https://mail.python.org/archives/list/python-ideas@python.or... I use "splat" all the time myself. On the other hand, itertools.starmap() is named this way because it does: def starmap(func, iterable): for e in iterable: yield func(*iterable) Things rarely have one name in computing. Hell I call curly brackets "mustaches" all the time. It's as hard as cache invalidation apparently.
- jacobolus 7y agoThat’s a mailing list email from 2016, and is a joke about bunch of silly non-standard names for punctuation (e.g. “bang”, “wack”, and “twiddle”). 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.
- sametmax 7y agoThe most famous JS template engine of the early 2000 used to be literally called "mustache" because of it: https://mustache.github.io/ https://mustache.github.io/
- jacobolus 7y agoYour 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/6ee6bcf21d3815545300b484c927d13a067fc7cc 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.