3 ms·
At first glance, I thought this was some new TC39 JavaScript syntax proposal. This is a cool site. I thought I'd look for a page about my favorite syntactic ph
by rezmason 1y ago
At first glance, I thought this was some new TC39 JavaScript syntax proposal.
This is a cool site. I thought I'd look for a page about my favorite syntactic phenomenon, "what all", and not only did I find it, but also they changed the "Who says this?" section header to "Who all says this?"
https://ygdp.yale.edu/phenomena/what-all https://ygdp.yale.edu/phenomena/what-all
- nine_k 1y agoWhy, "try and" could be like "try / finally", and "what all" could be filter(). I won't mind "await y'all" to await multiple promises.
- AlienRobot 1y agoWhat if... try { let x = parseInt(input); and { displayResult(x / 0); } } catch { displayError("Parsing error.") } And the catch can't catch a division by zero error because it occurred inside an "and" block.
- rcxdude 1y agoThat's kind of like python's try/else, but not quite (the 'and' would be more general, if you can interleave them with statements in the try block)
- sillysaurusx 1y agoIn practice you can move the displayResult(x / 0) outside the try catch. It’s hard to think of a counterexample that comes up in practice. There might be something to this idea, because I’ve often been in situations where a try catch catches an error that originates a dozen frames down the call stack, which is sometimes (but not always) unrelated to the original point of the try catch block. People try and deal with this by adding more try catches around the code deeper in the call stack, but maybe there’s a better way.
- nroets 1y agoWhat is this JavaScript thing ? I guess I come from a different era: https://en.wikipedia.org/wiki/COMEFROM https://en.wikipedia.org/wiki/COMEFROM
- thaumasiotes 1y agoThey seem to be missing the incipient disappearance of the -en form of verbs, with people saying things like "I should have went" instead of "I should have gone". It isn't clear why they feature the constructions they do. They are titled "Yale Grammatical Diversity Project", but the constructions are not necessarily examples of grammatical diversity: > Have yet to is a construction that appears in most, if not all, varieties of English. > this construction appears to be distributed across speakers in all regions and demographic groups. > Repetition clefts are quite widespread in English and can be observed as early as the mid-17th century > They are robustly attested in contemporary North American English and are also used in the UK. Related constructions have been observed in Australian English (McConvell 2004) and in a corpus of New Zealand English speech as well > the usage of repetition clefts does not apparently correlate with any sociodemographic features.
- deleted 1y ago[deleted]
- KurSix 1y agoFeels like one of those constructions you don't notice until someone points it out, and then you start hearing it everywhere
- deleted 1y ago[deleted]
- sudhirb 1y agoAnecdotally I think I have heard "what all" most commonly spoken by Indian English speakers - though that's probably quite far outside the scope of this site.