01:12
<Anthony Bullard>
For anyone interested in _ vs void for Discards, I've created https://github.com/tc39/proposal-discard-binding/issues/11 to discuss further.
I know we’ve talked a lot about void discards, but one thing I can’t remember if you’ve evaluated is (). I spent about 5 minutes right now on my phone thinking about it, so please be kind if I’m forgetting something obvious.
01:15
<Anthony Bullard>
That syntax is used for the Unit type in functional languages, so might make some intuitive sense, it’s not an operator, and should be unambiguous in all binding contexts, including pattern matching and extractors
01:39
<rbuckton>
() is not an option. One of the major motivators for discards is using declarations, and using() = foo would be interpreted as an Extractor in an assignment pattern, and it's already interpreted as an illegal assignment to a call expression.
01:40
<rbuckton>
See https://github.com/tc39/proposal-discard-binding/issues/10
01:58
<Anthony Bullard>
See https://github.com/tc39/proposal-discard-binding/issues/10
Sorry, I guess I missed this. Seems like we have been backed into a syntactic corner. I still hold that a four letter keyword for a discard pattern feels very gross, and many people will likely just use _ or some other one letter identifier maybe preceded by _
02:03
<Anthony Bullard>
Also, can I say I wish we could have eliminated space separated call syntax in strict mode at least. I’ve never understood the argument for it
02:17
<Michael Ficarra>
are there any languages that use postfix parens for function calls and don't allow spaces in all the same spots we do?
02:18
<Michael Ficarra>
while I don't think you should format your code like that, I think it would be very strange from a parser perspective to disallow it
02:30
<Anthony Bullard>
are there any languages that use postfix parens for function calls and don't allow spaces in all the same spots we do?
I’ve never seen a language where if that were allowed it was considered good style, and I’ve never implemented a language that allowed for it. Maybe when you use a parser generator that tokenizes first you can have some parsing performance improvements from it? I guess I’d have to check the syntax of a wide variety of C-like languages
02:33
<Anthony Bullard>
I guess I am forgetting about Allman style C