Remix.run Logo
rezmason 6 days 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

nine_k 6 days ago | parent | next [-]

Why, "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 5 days ago | parent [-]

What 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.
sillysaurusx 5 days ago | parent | next [-]

In 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.

rcxdude 5 days ago | parent | prev [-]

That'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)

thaumasiotes 6 days ago | parent | prev | next [-]

They 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.

6 days ago | parent [-]
[deleted]
nroets 6 days ago | parent | prev | next [-]

What is this JavaScript thing ?

I guess I come from a different era:

https://en.wikipedia.org/wiki/COMEFROM

sudhirb 5 days ago | parent | prev | next [-]

Anecdotally 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.

KurSix 6 days ago | parent | prev [-]

Feels like one of those constructions you don't notice until someone points it out, and then you start hearing it everywhere

5 days ago | parent [-]
[deleted]