There’s a nice list of this feature by language on the Wikipedia page for anyone interested: https://en.wikipedia.org/wiki/Null_coalescing_operator#Examples_by_languages
Yeah, you’re quite correct, it’s not exactly equivalent, I just went on auto-pilot because it’s used so much for that purpose 🤖
It’s much closer to being a true null-coalescing operator than ‘OR’ operators in other languages though, because there’s only two values that are falsy in Ruby: nil
and false
. Some other languages treat 0
and ""
(and no doubt other things), as falsy. So this is probably the reason Ruby has never added a true null-coalescing operator, there’s just much fewer cases where there’s a difference.
It’s going to drive me mad now I’ve seen it, though 😆 That’s usually the case with language features, though, you don’t know what you’re missing until you see it in some other language!
Ruby:
a || b
(no return
as last line is returned implicitly, no semicolon)
EDIT: As pointed out in the comments, this is not strictly equivalent, as it will return b
if a
is false
as well as if it’s nil
(these are the only two falsy values in Ruby).
There are new claims being published.
Recent article: https://www.euronews.com/2023/11/27/israel-stealing-organs-from-bodies-in-gaza-alleges-human-right-group
(Euronews MBFC page: https://mediabiasfactcheck.com/euronews/)
Yeah, I’m surprised it hasn’t been deleted for being against the rules.
Here’s a recent article from an actual news organisation: https://www.euronews.com/2023/11/27/israel-stealing-organs-from-bodies-in-gaza-alleges-human-right-group
And their MBFC page: https://mediabiasfactcheck.com/euronews/
It plans to open 900 new stores in the U.S. and 1,900 in some of its bigger international markets like Canada, Germany, the United Kingdom and Australia. The company said it plans another 7,000 stores in other international markets; more than half of those would be in China.
That is so much better 👍
Ain’t nothin’ but a heartache
deleted by creator
Title is missing a word or two. Should be ‘Likelihood that average global temperature to will rise …’ or something.
You should probably put this warning in the body text of the post and/or a [NSFL] in the title
I think they’ve combined politics with the circus. Now even people who think they’re paying attention are really just watching a show.
I’d assume the normal procedure in the case of bankruptcy would be to donate their collection to another appropriate museum. The article seems to me to indicate the museum is a charitable foundation, so it’s not like they have investors that need to recoup their losses in the event the museum is wound up.
They ingested it, but only as a joke.
This article is from December 2022.
Wayback archive link: https://web.archive.org/web/20230312112812/https://www.dailymail.co.uk/news/article-11494991/Switzerland-BAN-electric-cars-roads-power-shortages.html
Switzerland will ban the use of electric cars for ‘non-essential’ journeys if the country runs out of energy this winter, the government has announced.
I’m sure they have the same plans in place if there is a gasoline shortage, and this will have been prompted by a methane shortage due to sanctions on Russia. Hardly grounds for a hit piece on electric cars.
Go as the Blue Screen of Death: https://en.m.wikipedia.org/wiki/Blue_screen_of_death
Now that’s spooky! 🟦😱
Wear all blue clothes, and get a copy of the screen printed (not on your home printer) to wear on your chest.
“Hello, this is Linus Torvalds and I pronounce ‘Linux’ as ‘Linux’.”
So yeah, he pronounces ‘Linus’ like ‘LEE-noose’, and ‘Linux’ like ‘LEE-nooks’. (Roughly, anyway. It should get the point across for most English speakers, I’m not at a computer to do a more-correct IPA transcription right now.)