Readit News logoReadit News
QVVRP4nYz commented on Null-Restricted and Nullable Types   bugs.openjdk.org/browse/J... · Posted by u/lichtenberger
jeroenhd · 2 years ago
The difference between this approach and the approach C# took when they implemented this a few years ago is intereting. With C#, you enable nullability in a project, and every variable is declared as non-null unless you explicitly mark it as nullable (or use compiler directives to disable nullability for a block of code). With this proposal, all existing variables will be effectively nullable, explicitly nullable, or explicitly non-nullable.

Kotlin, another JVM language like Java, also follows the C# approach, assuming everything is non-null unless explicitly marked as being non-null, except Kotlin doesn't have backwards compatibility to worry about. Kotlin also offers a special `lateinit var` declaration for leaving a non-nullable type unassigned until initialization in another method, throwing a special exception on uninitialized access, which is an interesting workaround for some code patterns that this approach doesn't seem to cover.

I wonder why the choice to offer three options was made. Why not keep the non-annotated variables as nullable and make annotated variables explicitly non-null instead? I can't think of a reason why you would want to declare something as nullable when not declaring anything automatically makes the type nullable anyway.

I think I like C#'s approach better, although this has the benefit of being usable in a legacy code base without having to solve any of the nullability issues. Then again, the C# approach does immediately highlight nullability issues in a code base, whereas this proposal hides them the same way they've always been hidden.

Additionally, I find this strange:

> One method may override another even if the nullness of their parameters and returns do not match.

This feels like a footgun for when a developer overrides/implements some kind of callback and returns null where the overridden method specifies non-null return values.

QVVRP4nYz · 2 years ago
> I can't think of a reason why you would want to declare something as nullable when not declaring anything automatically makes the type nullable anyway.

All existing code is "we don't know if it is nullable until someone reviews it", that is different than explicitly allowing nulls. To add to confusion all Optional<> variables should be not-null or using Optional makes no sense at all.

QVVRP4nYz commented on Google is the only search engine that works on Reddit now, thanks to AI deal   404media.co/google-is-the... · Posted by u/turkeytotal
debacle · 2 years ago
Reddit has been ripe for disruption for years. It's just waiting on an inflection point and someone to take it behind the barn.
QVVRP4nYz · 2 years ago
The killing of third party clients didn't have significant impact, I don't know what would they have to do to lose users, other than some kind of mandatory subscription fee.
QVVRP4nYz commented on Google is the only search engine that works on Reddit now, thanks to AI deal   404media.co/google-is-the... · Posted by u/turkeytotal
ykonstant · 2 years ago
It's ironic, because Reddit is the only search engine that works on Google now thanks to shittening.
QVVRP4nYz · 2 years ago
For years reddit build-in search was broken (or at least broken) and people were forced to use 3rd parties like google, so we came full circle.
QVVRP4nYz commented on MicroMac, a Macintosh for under £5   axio.ms/projects/2024/06/... · Posted by u/als0
ikari_pl · 2 years ago
not in Poland... :(
QVVRP4nYz · 2 years ago
Allegro is full of refurb mini PCs, mostly Dells. It is complete computer for less than $100 [0], like https://news.ycombinator.com/item?id=40697831 says, it is very hard to beat it in terms of value. That said it is much harder to get nice notebook/tablet, the wear and tear is very visible on screens/keyboards.

[0] to my surprise the one I grabbed had an internal mono speaker(not beeper) somewhere in the case.

QVVRP4nYz commented on Italian town is struggling to sell off its empty homes for one euro   cnn.com/travel/patrica-it... · Posted by u/priyankanath
rightbyte · 2 years ago
There has to be some catch or legal hurdle involved?
QVVRP4nYz · 2 years ago
A catch? You need between 50k and 200k euro for renovation, depending on size, and if you change your mind there is no one to sell it to recoup the cost. There is no local job market either. That leaves retired couples and digital nomads, and neither of them actually wants to live in "middle of nowhere", far from health services or any entertainment. I mean, the core issue in all of those depopulated towns is that everyone left to live in better places ...
QVVRP4nYz commented on Automakers are sharing consumers' driving behavior with insurance companies   nytimes.com/2024/03/11/te... · Posted by u/xnx
FirmwareBurner · 2 years ago
In which country is that?
QVVRP4nYz · 2 years ago
I don't know about OP but in Poland https://yanosik.pl/ offered such deals ( https://payhowyudrive.pl/ ). It is probably a bit self defeating - the app's main function is warning about speed traps, that means unsafe drivers as significant part of its users.
QVVRP4nYz commented on The failure of self-checkout technology   bbc.com/worklife/article/... · Posted by u/LaksiMati
workfromspace · 2 years ago
Obviously this sounds like such a US problem. Self checkout in the UK and Europe (Estonia and Barcelona) IME works perfectly:

- No thefts

- Many people with card payments

- Working self checkout machines

Also, recently I have been thinking how come the US is pioneering so many tech but fail to implement any, such as:

- Payments: No SWIFT/IBAN, still lots of cash usage, no e-invoices (ie for utility bills), still using paper checks, physical emails

- No national identification cards or numbers

- Very limited e-government services

And the argument I've been hearing the most is freedom; which also sounds oxymoron, coming from the country with the worlds strongest 3 letter agencies.

QVVRP4nYz · 2 years ago
Ignoring the question if USA is actually behind: there is a very strong technology catch-up effect. Some countries started mobile phones with 3G, and never wasted money on quickly outdated analogue/2G hardware. New banks created in 90s in Eastern Europe also benefited from not having 30 years old legacy mainframe systems running COBOL.
QVVRP4nYz commented on Writing books remains a tough way to make a living   publishersweekly.com/pw/b... · Posted by u/gone35
jimmyed · 2 years ago
Another reason for this is the sheer amount of rubbish literature that is being printed, specially in the category of "Young Adult". There are endless streams of psychopath male leads and damsel in distress characters, with predictable story lines and pretentious dialogues.
QVVRP4nYz · 2 years ago
> There are endless streams of psychopath male leads and damsel in distress characters, with predictable story lines and pretentious dialogues.

I mean - it sells. Is it readers fault if other authors write unpopular stuff? "Royal Road" is my guilty pleasure. Almost everything there conforms to that quoted scheme but even among mountains of crap there exist various degrees of quality. That said the popularity isn't strongly correlated to that - checking 2 authors I follow one has $300/month on Patreon while other $20k/month.

QVVRP4nYz commented on uBlacklist: Blocks specific sites from appearing in Google search results   github.com/iorate/ublackl... · Posted by u/st_goliath
Takennickname · 2 years ago
The lack of this feature on Google shows whose interests they truly have at heart.
QVVRP4nYz · 2 years ago
There might be other explanations, thought not necessary better. For example maybe they are following Steve Jobs' dream of single button apps? All not essential features confuse people[0]. Google have already hidden "cached" version link in tiny hamburger menu.

Or they assume they know better what the users wants than the users themselves. YouTube straight up ignores dislikes - and will show disliked video in mixes or at first place of search results.

If we give Google the benefit of doubt, maybe people just kept accidently blocking useful sites and later complained they couldn't find anything? Thought Steam deals with that perfectly: search results start with disclaimer: "8,875 results match your search. 2,053 titles have been excluded based on your preferences." - and it takes 2 clicks to go back to unfiltered results.

[0] - well, at least Gnome project follows that idea, killing any discoverability

QVVRP4nYz commented on Notation Must Die: The Battle for How We Read Music [video]   youtube.com/watch?v=Eq3bU... · Posted by u/jacquesm
harryvederci · 2 years ago
The transition from the chess intro to music notation at around 9:30 is amazing :D
QVVRP4nYz · 2 years ago
I watched it before and the thing that I will forever remember from it was the "jubilate": https://youtu.be/Eq3bUFgEcb4?t=1346

u/QVVRP4nYz

KarmaCake day61August 11, 2023View Original