One problem is that closures don't actually behave like blocks. Consider that you might want to use this three-legged-if inside a loop. If it's a real statement, then those branches can have `break;` and `continue;` statements which affect the surrounding loop. If those branches are just closures being passed to a function, then they can't.
The problem is that you are collapsing two users with very different needs into a single one.
1. If you are authoring an XHTML file, yes, you want the renderer to be as picky as possible and yell loud and clear if you make a mistake. This helps you produce a valid, well-formed document.
2. If you are an end user reading an XHTML file, it's not your file, it's not your fault if there are bugs, and there's jack shit you can do to fix it. You just want the browser to do its best to show you something reasonable so you can read the page and get on with your life.
XHTML optimizes for 1 at the expense of 2. HTML5 optimizes for 2 at the expense of 1.
For some reason generating a valid wire format seems to be no problem for people when it comes to json. Forgot to escape a quote? Woops, that’s on me, should have used a serializer.
But add a few angled braces in there and lord have-a mercy, ain’t nobody can understand this ampersand mumbo jumbo, I wanna hand write my documents and generate wutever, yous better jus deal with it gosh dangit.
I prefer the current situation too but I still think it’s funny somehow we just never bought into serializers for html. Maybe the idea was before its time? I’m sure you’d have no such parsing problems in the wild if you introduced JTML now. Clearly people know how to serialize.
> For some reason generating a valid wire format seems to be no problem for people when it comes to json.
The "some reason" is that JSON is most often produced by code, written by programmers.
That's not the case for HTML which is often hand-authored directly by non-programmer users. Most people on Earth literally don't know what the word "syntax" means, much less feel comfortable dealing with syntax errors in text files.
"Most people on Earth" can't write HTML. And if one doesn't know what the word "syntax" means, they are not going to have much success writing HTML - after all, ignoring the errors does not make them go away.
Instead, it seems your choices are either:
(1) errors cause random changes on page, such as text squishing into small box, or whole paragraphs missing, or random words appearing on page, or style being applied to wrong text etc...
(2) errors cause page to fail loading with no text shown at all
Both of those are pretty bad, but I wish web would go with (2) instead of (1). Because in that case, we'd have whole ecosystem of tooling appear... Imagine "auto fixup" feature in web servers which "fixes up" bad HTML into good one. For basic users, it looks the same as today. But instead of fixup and guesswork being done by users' browsers (which author has no control of) it would be done by author's webhosts (which author can upgrade or not upgrade as needed...)
> 2. If you are an end user reading an XHTML file, it's not your file, it's not your fault if there are bugs, and there's jack shit you can do to fix it. You just want the browser to do its best to show you something reasonable so you can read the page and get on with your life.
Here's the thing though, if all XHTML clients are strict about it then that means the content is broken for EVERYONE which presumably means it gets noticed pretty quickly as long as the site is being maintained by anyone.
Compare that to HTML where if a page is doing something wrong but in a way that happens to work in Webkit/Blink while it barfs all over the place in Gecko it could go ignored for ages. Those of us who are old enough remember an era where a huge number of web sites only targeted Trident and didn't care in the slightest whether it worked in any other engine.
There has to be an opposite to Postel's Law that acknowledges it's better in some cases to ensure that breakage for anybody becomes breakage for everybody because that means the breakage can't be ignored.
If authored files had to be valid in order to work, how would the author have sold you an invalid file in the first place? They would have seen that it didn’t work when they were making it, and fixed it. If they’d sold you a book that didn’t open, you’d be entitled to a refund.
Imagine two file formats competing to be "the web":
* In file format A, the syntax is narrowly specified and any irregularity causes it to be not rendered at all.
* In file format B, there are many ways to express the same thing and many syntactic forms are optional and can be omitted while leaving a page that still renders.
Now imagine millions of non-technical users are trying to make websites. They randomly pick A or B. Which ones do you think are more likely to get to a point where they have a page that renders that they can put online? It's B.
Even though the file format of B offends our software engineer sensibilities, in an evolutionary sense it is much more robust and able to thrive because more fallible users are able to successfully write working files using it. It will completely dominate once network effects get involved.
> How did they ship pattern matching in 2023, with a million examples of how to do it right already hashed out and in the wild... and then not figure out a wildcard symbol for 2 years?
We shipped support for `_` as wildcards in patterns with Dart 3.0 when pattern matching first shipped.
However, prior to Dart 3.0, `_` was already a valid identifier (as it is in most other languages). The feature you're mentioning from last year was to remove support for uses of `_` as an identifier outside of patterns. This way `_` consistently behaves like a wildcard everywhere in the language. We didn't ship that in 3.0 because it's a breaking change and those are harder to roll out without causing a lot of user pain.
It's OK to not like Dart. There are multiple popular languages for a reason. But it is helpful when communicating about a language to others to be accurate so that they can make their own informed opinions.
I really like the article but in order to get the most of it, I had to mentally change the author's writing style. I think the article works much better if you reframe it from second person to first person and restate the general platitudes as observations of one particular place and experience.
Part of the magic of being human is the interplay between our external world and internal states.
Two people can go to the exact same venue, do the exact same things, and have radically different experiences because of how our different internal worlds collide with that same external world.
And a further part of the magic of being human is that we're then able to share those experiences with each other. I wouldn't want to diminish someone else's experience of a place simply because I didn't have that same experience.
Exposure therapy is the cure for anxiety. I have a personal hunch that part of the massive rise in anxiety in the world is explained by many of us no longer being regularly forced outside of our comfort zones. Before the Internet and smartphones, we were obligated to go into the unknown much more often. It was a constant mandatory exposure therapy.
Today, I can't remember the last time I walked into a restaurant without already having seen the inside on Google Maps, read several reviews on Yelp, and perused the menu online.
Nah, it’s actually a studied thing. Exposure therapy can work for some subjects but it’s quite controversial due to it quickly becoming “trauma therapy”. It can easily reinforce someone’s existing beliefs and make someone actually weaker and traumatized. Happens a lot. Imagine an ugly kid asking every girl out at school, you think maybe he just needs to get a single success but it’s possible he gets completely rejected and/or the rejections are so immense that it overpowers any single acceptance. He won’t be resilient from this - it will haunt him for the rest of his life. Plus, there can be social consequences (and consequences with other exposure therapies) that will be lasting from making such a brute force strategy.
Exposure therapy can make sense if it always resorts in good outcomes but that’s the issue - bad things do happen. And sometimes bad things happen more often to those who are “needing” exposure therapy.
> Imagine an ugly kid asking every girl out at school, you think maybe he just needs to get a single success but it’s possible he gets completely rejected and/or the rejections are so immense that it overpowers any single acceptance.
Just randomly doing shit that causes you stress isn't exposure therapy. It's just hazing yourself and rolling the dice as to the outcome.
> Exposure therapy can make sense if it always resorts in good outcomes but that’s the issue
I think you have an over-simplified notion of "good outcome" here.
It's not necessarily about achieving the goal of the action, it's about seeing that the catastrophizing scenarios in your head aren't based in reality. In the example with the ugly kid, if he's afraid that asking a girl out will lead to her laughing in his face and publicly humiliating him, then even simply being rejected with compassion is enough to thwart that catastrophizing.
But, of course, having him ask out every girl at the school is a terrible example of "exposure therapy". Strangers should not be used as unconsenting test subjects in one's personal therapy.
Certainly every coffeeshop here in Seattle has them and and I expect most do elsewhere too.
Espresso has taken over coffeeshops such that some won't also have drip coffee anymore and if that's what you want, an Americano is approximately how to get it.
I’ve been ordering Americanos for 20 years. Espresso drinks became a very common thing around the time when Starbucks took off in the 90s. But it does depend on where you go. Diners and gas stations and some kinds of cafes and restaurants (especially in small towns) often only had drip coffee until recently, but these days you can get an Americano in many gas stations too. Cafes with baristas making espresso drinks is the norm in big cities and has been for some time.
> if you didn't know any better, might make you think that AI is a worthless technology.
"Worthless" is ambiguous in this sentence. I think people understand that AI isn't useless in that it at least to some degree does the things it is intended to do. At the same time, it might be valueless in that a world without it is preferable to some.
Landmines are not useless, but they are valueless. Opinions differ is to what degree generative AI is like landmines in terms of externalities.
This hides a lot of local detail though. Something might be valueless by your definition because on aggregate it does enough harm to balance out the good, but still have great value in specific contexts. Even landmines might look quite useful in eastern Ukraine at the moment.
More important is to remember the impact of technology is not inevitable or predetermined. We can have (some) agency about how technologies are used. The impact of AI is likely to be much more negative than it could be because of he tech bro oligopoly emerging in the US. But that isn't because of 'human nature' or something inevitable or baked into the tech — it's because of local, historical factors in the US right now.
I agree that externalities and complex, and situational, and that the value proposition of a piece of technology is most certainly not uniformly distributed.
> The impact of AI is likely to be much more negative than it could be because of the tech bro oligopoly emerging in the US.
There is circularity here because the tech bro oligarchy will certainly be empowered and enriched by AI as well.
I don't know about other HN readers but some of us wake up in the morning and can't wait to create unprecedented alignment between IP owners, creatives, and developers.
I find that any performance benefits Chrome and Safari have are more than offset by the performance benefits Firefox gets by being massively better at blocking ads and the huge amount of JS and tracking garbage that comes with them.
Firefox always feels snappier to me, and I think most of that comes from less time downloading a bunch of ad shit I don't want anyway.
reply