Hacker Newsnew | past | comments | ask | show | jobs | submit | papa0101's commentslogin

React and its ecosystem is a pile of garbage perpetuated by industry inertia. UseState, useMemo, useThisAndThat where you have to guess whether that dependency will cause a re-render? Or 20 different routers, state managers, query builders? I'm not even talking about html-in-ts with `!!a && (<div>...</div>)` A stodgy, bloated, overhyped and misused monstrosity, that's what React is.

useMemo is definitely a scourge on my existence. Doesn't help that a bunch of people write articles like "don't bother with it!!" when memoisation results can cause actual real bugs when integrating with a third party lib.

Unmounting and then remounting the same component is actually a bad thing when you lose your component state in the process. And when you have enough useEffect's in your system that's exactly what happens unless you're liberally sprinkling useMemo


React is opinionated. The whole point of the library is having UI updates being driven by state mutation. When I hear complain about the hooks, I ask about what is the state, and where do mutations occur, and usually, I get blank stares in returns.

It's all about the state. `useState` is the starting point (adding new items to the state set), `useEffect` for tying the UI to external systems, `useMemo` for state transformation, `useRef` for storing stuff outside of the state you want to react to,... Then you use custom hooks to make the code modular, stuff like usePost, useProfile, useCommentUpvote,... (HN domain)

If you design your state well, the application, at least the UI layer, becomes easy to code and maintain.


This could potentially open doors for short-haul e-aviation. Very interesting


yep PGLite + Go would be great!


Yeah would really make testing a tonne easier.


That, and reduce the immigration ffs. Importing a city-sized population (500k+) every year? - Sorry mate, you just won't be able to build a new city every year.


In the 1950s the UK was adding about 260k babies per year with a population of about 50 million, or about 0.52% per year

Net migration (immigrants - emigrants) in 2024 was about 0.63%.

I would hope the productivity advances in the last 75(!) years would allow the Uk to build enough homes for 0.63% growth, when our 1950s tools and technology allowed them to accommodate a 0.52% growth


Housing demand caused by births and immigration are different. A baby generally calls for an additional bedroom (easier away from the city), an adult migrant generally calls for their own residence near other migrants (easier in the city).

In the past, the population was growing even while net migration was negative. This means people were having babies. This trend reversed in the '80s and migration has made up somewhere between 37% and 128% of annual population growth since then.[1]

There'd have to be some incredible innovation to overcome increased regulation around zoning and dwelling construction generally, NIMBYism, financialization of everything, and a preference shift towards living in land-scarce cities (urban population up ~145% since 1950).

1: https://www.worldometers.info/world-population/uk-population...


Unless you plan for children to never leave the parental home, wouldn't housing demand caused by births just be identical to that caused by immigration, only phase shifted 20 years or so?

Meanwhile the baby is essentially a net drain on productivity, whereas an immigrant is not.


My point was to illustrate that not all population growth is fungible, so comparing birth-driven growth from the '50s to migration-driven growth since the '80s will miss things.

To your point about phase-shifting though, I think that's a definite possibility, but relies on preferences of each community, and how they change by generation.

Urbanization is not solely driven by immigrants, but how likely are immigrants to move into lower density housing when they have kids? What about their kids? And their kids, etc? And compare that to non-immigrant (or non-recently immigrated) preferences.

The relative productivity of babies and immigrants is not of interest to me in talking about housing preference, but you're correct that babies don't directly add much to GDP for the first two decades.


Immigrants can immediately provide labor for building more housing, babies not so much.

The next false argument is saying ”by the time the 50s babies were moving out, the population was higher so the ratio of new homes needed was not as dire”, as if the infants of the 1970s could provide construction labor


Tell that to China, who has been building so many new cities that their housing crisis is too many homes.


That's what investor money will do; in western Europe, the same thing has happened with office buildings. At one point, 40% of all office space in the Netherlands was vacant. Investors prefer to invest in office space over housing because it's less parties to interact with, higher rent, 10 year lease contracts, and 100 year lifespan.


China and the UK are not comparable in scale. Also China isn't importing permanent immigrant populations


They are very different societies, sure. I don't think anyone would argue that point. But China has 1.4 billion people, and yet they have an overabundance of housing. If we are trying to find effective strategies for ending homelessness, that seems like a great situation to study.


Without population growth and without immigration your economy will collapse. Good luck with that.


I mean. Had it escaped your attention those immigrants are he ones building the cities?


Great, immigrants build as much or more housing than they occupy, as a whole. Good news everyone - problem solved! There's no housing shortage after all!


The obligatory “To love is to suffer. To avoid suffering one must not love. But then one suffers from not loving. Therefore, to love is to suffer; not to love is to suffer; to suffer is to suffer. To be happy is to love. To be happy, then, is to suffer, but suffering makes one unhappy. Therefore, to be happy one must love or love to suffer or suffer from too much happiness.”


All non-stick frying pans die within a year or so. We recently took the plunge and invested in a stainless steel one. Yes, it takes some (very little) time to adjust your cooking style, but that thing comes with a lifetime guarantee and you don't have to worry about accidentally scratching the surface. Win-win.


How does stainless steel compare to ceramic? I find that as much as ceramic coatings are advertised as nonstick, I have to clean them anyway.


Stainless steel can and will stick to some food, but a good one can hold very high amounts of heat and will heat up very evenly.

I think at the end, it boils down to cooking style and preference. We use both (non-stick and stainless steel), and some foods are easier to prepare in one w.r.t to other, however, nothing is impossible in either.

All non stick coatings require care though. Never scrape with metal, do not wash in the dishwasher, and do not overheat.

The rule 0 of item maintenance is, "if you care for your item, your item cares for you when you need it".


> All non-stick frying pans die within a year or so.

I'm very interested about how you can achieve this.


I could definitely picture achieving it with a metal spatula.


Ah, reminds me of my intro to maths and trig in the good old Flash days! https://www.kirupa.com/developer/as3/physics_bounce_effect_p...


So, a socialist society then?


Make it opt-in, please.


That was google's original plan with Dart.


I believe Dart was originally gradually typed, and then abandoned the gradual typing for strict-typing-by-default? That doesn't quite sound properly type-safe to me although still safer than how Javascript is by default.

My only reference is a memory of this talk by Richard Feldman but I might be wrong or misremembering. https://www.youtube.com/watch?v=Tml94je2edk


Released 22 February 2018

Dart 2.0 implemented a new sound type system

Dart's type system, like the type systems in Java and C#, is sound.

https://dart.dev/language/type-system


Thanks for the link. I'm aware Dart currently has static typing similar to Java and C#, and has had it for some time,

My question was different though and I was asking (quoting comments further up the chain) whether "google's original plan with Dart" really was to allow for a programming language "which can be properly type-safe from the beginning".

It seems that claim about the original intent is false. I checked Wikipedia [0] which states "Dart 2.0 was released in August 2018 with language changes including a type system" and the reference they link seems to corroborate that, before 2.0, Dart didn't have a sound type system.

Thanks for prompting me to dig deeper (I probably wouldn't have done it without seeing your comment).

[0] Quote found under the history section. https://en.m.wikipedia.org/wiki/Dart_(programming_language)


Thanks, I was probably responding to “That doesn't quite sound properly type-safe to me” in isolation.


Is Dart sound these days? When I tried it, it was pretty easy to trigger type errors at runtime.


These days Dart — considers all variables non-nullable — enforces sound null safety."

https://dart.dev/null-safety


Well, null safety is a good start.

But I seem to remember that the type-checker got confused rather easily with nested closures, for instance, or co/contra-variance.


I suppose it all depends on personality: some swe's prefer to write, some prefer to draw (I do both, but would hate to only have to deal a 1mil-lines-of-code fractal, but would be (and am) fine with the 1970 approach). The OP's solution then might be a great addition to my toolbox.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: