@freemo I'm looking to migrate servers, but I get an error page with a 500 (Internal Server Error) status when I submit the form on the redirect setup page. I set up the account alias on my new account about a week ago.

BTW, thanks for running this place, it's been a great introduction to Mastodon.

@aismallard yeah, it's possible it might have to be parenthesized. I think there's some reason to think it could be workable tho since this would always be in the context of a list item, either after the opening `[` or a `,`.

As mentioned in my other comment, if you had prefix &, you'd have

Promise.all([
& condition1 && task1()
& condition2 && task2()
& condition3 && task3()
])

which is even less noisy.

@aismallard @rauschma

If so, it raises a couple interesting points:

- Having it be null-based requires the explicit null in the false branch of the conditional. A falsey-based version (e.g. prefix &) would allow for something even more streamlined.

- Although not applicable to Promise.all, I can imagine similar syntax for conditional arguments to variadic functions.

@aismallard @rauschma I agree. Something like this?

Promise.all([
? condition1 ? task1() : null,
? condition2 ? task2() : null,
? condition3 ? task3() : null,
])

@rauschma Sorry for the delayed response, but thanks, Axel!

I JavaScript, has a spread-like operator for optional elements been considered? Something like:

['a', ?'b']
=> ['a', 'b']

['a', ?null]
=> ['a']

I know you can emulate this with a spread + conditional + array literal, but I think this could be way simpler to understand.

@rauschma or any other JavaScript experts

Show older
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.