Maybe go just isn’t for you? It really doesn’t need every feature of other languages. The error handling is ideal for me, better than any other language. You are always explicit, with every function call, about “what could happen if this fails?”
Maybe passing it up the stack is the best way to handle it, but also maybe it’s better to handle it somewhere in the middle.
The thing that always happens with exceptions in API projects I’ve worked on, is that exceptions can come from any level of the stack, then by default it skips everything in the middle, and the controller has default handlers for what to do in case of an exception.
If there are exceptions you didn’t know existed because of some library or just complex code with dozens of possible exceptions? They still end up being handled in your controller. You need to know exactly what exceptions could happen at every level of the stack, and how to handle it, otherwise everything just short circuits.
With the go errors, you only need to know “did this function call work? If not, then what?”
However, I strongly prefer rust error handling to Go.
go:
(res, err) := foo()
if err != nil
return err
(res, err) := bar(res)
if err != …
Equivalent rust:
let res = bar(foo)?)?;
I think go should add the ? sigil or something equivalently terse.
Ignoring all the extra keystrokes, I write “if err == nil” about 1% of the time, and then spend 30 minutes debugging it. That typo is not possible in idiomatic rust.
and 99% of the people will learn the ? shortcut in fraction second. it's just like every other operator ffs.
are you dumbfounded everytime you see the channel operators (->) ? noone takes a second thought to them after the first couple of seconds when they encounter them the first time.
This would drive me nuts to write as a Scala dev, but I can see merit to the philosophy. Go basically lowers the ceiling to raise the floor. Meanwhile Scala can let you glimpse the heavens but has no problem showing you the deepest, darkest pits of hell.
But an individual human eats a fixed amount of food. So that fact seems pointless, since people will get less nutrition overall- unless we should all only eat ultra-processed snacks and reserve fresh food for the wealthy?
On what basis do you claim that an individual eats a fixed amount of food?
If you're worried about how artificially elevated CO2 levels affect agricultural products, then you should start taking issue with commercial greenhouses, which regularly pump CO2 in to increase yields. This is a common practice, and only now is it being viewed as something bad or strange because it's not convenient for the climate change narrative that presents industrial emission of CO2 as the apex threat that requires government-enforced collective action to solve.
Mount Evans was local to the US, and was not a contested international name. This is the first time the US has been on Google's "Sensitive Country" list.
The US does not control the majority of the Gulf of Mexico. It cannot "change the name" of it any more than it can change the name of the Moon.
The executive branch has decided to call it something different than its internationally accepted name as a political stunt. Google could just ignore this, but instead they chose to obey in advance.
I mean I agree that it’s stupid, but my point was that there are protocols in place to handle this already.
If the US government says it’s the name of something, then it’s any map company’s job to display the valid name of the thing to the users in that country. They still show “Gulf of Mexico” to users in other countries.
Well for one thing it's stupid to change the name. Per your example, I still call it Mount Evans and so does everyone else. This sort of thing is just a pissing contest where the government figures they can up and change the name, but that doesn't mean anyone is obligated to go along with it.
Ideally something like 5min bike ride to the grocery store, 15min walk from a train station, and 30min drive to my in-law’s house.
It would be really interesting to do something like “10 minute bike ride to 3 or more grocery stores”. That would help reduce instances of niche specific stores, but also provides a much more useful variety.
I’d love to be able to find places that have 2+ or 3+ grocery stores within somewhat reasonable distance, and same thing goes for restaurants. Really any restaurant.
1. User defines a "multi-location" spec, like "MyFastFood" as "Having [2] or more of [Fast Food] excluding [Taco Bell,]"
2. User defines a requirement for their heat map which references the multi-location, ex: "Within [30 minutes] to [walk] to [MyFastFood]"
3. Within the context of a particular [user's requirement] and broad [city/town/region], a 2D area/gradient can be generated, and cached for a rather considerable period given how slowly businesses open/close.
Granted, that's the ambitious version. A simpler one would be to not support "at least X", and to combine the multi-location and the distance-rules all together into a single condition.
If it’s the same as mine, it measures your heart rate overnight after you settle in. Then, when you wake up, it tells you your “resting heart rate” number.
It can be an indicator of short-term stress if it is higher than normal, for example. But the interesting part is the trend over time. As you get more fit, the average drops
Something like iDeal, which is a payment processing system in the Netherlands.
It works so well and is very secure. You get to the checkout page on a website, click a link. If you’re on your phone, it hotlinks to open your banking app. If you’re on desktop, it shows a QR code which does the same.
When your bank app opens, it says “would you like to make this €28 payment to Business X?” And you click either yes or no on the app. You never even need to enter a card in the website!
You can also send money to other people instantly the same way, so it’s perfect for something like buying a used item from someone else.
Plus the whole IBAN system which makes it all possible!
I’m not actually sure since I never had issues, but I’ve heard it’s not much since they’re basically just an API for transferring money between banks. Each bank app still needs to integrate with the network separately. [1]
I guess you get some security since each party that you transfer to must have their identity verified with a bank, so you could always get the police involved fairly easily
The iDeal website page on security [2] is in Dutch, but it translates to roughly:
> Before you make a purchase, make sure that the webshop or business is a reliable party. For example, you can read experiences of other consumers about webshops on comparison sites. Or you can use a Google search to check what is said (in reviews) about a webshop on the internet. Also check the overview of the police with known rogue trading parties and the page check seller data. Before making a purchase, always use the following rule of thumb: if something is too good to be true, don't do it.
Edit: thanks for all of the replies, I’m questioning my framing here now due to some smart people’s thoughts.. I suggest reading the full thread, as there are some interesting comments.
I see the obvious parallels to Trump, and I agree completely (and hate that it is happening). But I feel like I also see a lot of parallels to the democrats. Deciding Kamala would be the candidate without any public vote, for example. They both have aspects that heavily mirror the article.
I normally am not a fan of both-sides’ing an issue, but this seems like a literal case of everyone in the government basically performing that they disagree with the other, while marching down similar paths. They fight on issues that get people excited, while conspiring together to inch towards a “mystery government” which we must just trust.
I believe the path forward is to find things in common with our neighbors rather than politicians. Even if we disagree on some political views with our neighbors, we likely still have a lot more in common with them than any politician.
And, if you disagree, really truly read this with a critical eye, imagining the other side. Listen to their complaints. Because they feel the same way about your side. I’ve literally heard smart people in both political parties call each other authoritarian. So maybe the issues are actually with both sides.
Democrats did not subvert the checks and balances of our system - they faced opposition in all their initiatives in the judiciary, house, and senate.
What Musk is doing now amongst a silent government is unprecedented. His youth group is marching into federal offices walking past security and taking everything because people are afraid. They’re afraid of being fired. They’re afraid of reprisals.
The next step will be for Musk to USE what he’s taken from these IT systems. There’s a reason he beelined for the IT systems.
They have everything they need now to make lists. That is the next step. Lists of names.
Your comment comes off as alarmist, but then I realized the content of the article, and think that you may be right.
I still stand by my point that most of our politicians have done this to us, on all sides of the political spectrum. And that we would be better off empathizing with our neighbors rather than any politician.
But the scale of the jump from previous actions to this one is enormous and shouldn’t be dismissed at all.
It seems alarmist until you consider that Musk is a Nazi. He did the Hitler salute, live on national television. His followers tried to downplay it, but his own answer to the question "Are you a Nazi?" was "I bet you did Nazi that coming!"
People joke that he went from being the Henry Ford of our generation to being the Henry Ford of our generation.
I don't know whether I would say that Trump is a Nazi*, but the fact that he put a Nazi in charge of firing govt employees that don't follow orders does not bode well.
EDIT: * If only because he has never publicly admitted to being a Nazi like Musk has.
You're asking the wrong question. If it wasn't a Nazi salute, why doesn't he say so?
I've seen enough gleeful comments by real, actual, self-proclaimed Nazis to know that they saw it as a Nazi salute. If I ever did any gesture that could be interpreted this way, I wouldn't hesitate a second to denounce them and apologize for the gesture.
Why has Musk still not done any of this, even though he knows that Nazis consider his gesture a Nazi salute? Why not come out and say "it wasn't meant to be a Nazi salute"?
> If it was, why wouldn’t he just say so? What would be the point in doing it in the first place?
Because he wants Nazis to support and like him, while giving non-Nazis "plausible deniability". He gains support from the base of the president he's working with while not really losing much.
Again, let's turn the question around: if it wasn't a Nazi salute, why wouldn't he just say so? He'd lose the support of Nazis and gain the respect of everyone else. Seems like an absolute no-brainer.
Musk is a traitor per US legal definition and his actions highly resemble a hostile foreign national takeover, he deserves nothing less than the maxumim punishment under current US law...
I see your point, however, in this case the democrats and republicans are part of the same entity.
I am suggesting that the politicians’ interests are somewhat aligned, in regard to grabbing power. Their techniques are different, but the outcome is that we become more normalized to the behavior of “being ruled”, bit by bit.
Don’t forget the right-leaning protests in 2020 over democratic governors telling people they had to get vaccinated or fired, and they were not permitted to have their small businesses open or go to the gym. That was also authoritarian, regardless of how necessary some people thought it was at the time. You may not have agreed with them, but they were upset about the same things as you.
An actuall global event that killed hundreds of millions of individuals is a very different thing than what Musk is doing, without any such precipitation...
I do not agree that firing should have been on the table, however this is not an Apples and Oranges situation...
Rather than thinking in terms of "left vs. right", I think in terms of "extreme left vs. moderate left vs. moderate right vs. extreme right". I support moderates over extremists. I support democracy and rule of law. I care about this more than I care about left vs. right.
> Rather than thinking in terms of "left vs. right", I think in terms of "extreme left vs. moderate left vs. moderate right vs. extreme right". I support moderates over extremists. I support democracy and rule of law. I care about this more than I care about left vs. right.
This is a great position. I wish more people adopted it.
The problem I have seen over the past few years is that those who are on the extremes are not aware that they are on the fringe. They believe that their ideology is widely shared and common amongst everyone.
> Protesting [police] brutality is right and necessary. It’s an utterly American response. But burning down communities and needless destruction is not. Violence that endangers lives is not. Violence that guts and shutters businesses that serve the community is not.
We need more of that from our politicians. When Republicans are willing to criticize Trump, I respect them enormously for it; but few Republicans are willing to publicly disagree with Trump.
Agreed - I think we say similar things. I am mostly suggesting that authoritarians currently live in all sides of the aisle in our government right now. And they’ve all been ratcheting up in intensity, getting us used to “their” version of it. This latest jump being by far the most severe and scary.
No laws were broken. But it's very much in line with what the article is talking about:
> What happened here was the gradual habituation of the people, little by little, to being governed by surprise; to receiving decisions deliberated in secret; to believing that the situation was so complicated that the government had to act on information which the people could not understand, or so dangerous that, even if the people could not understand it, it could not be released because of national security.
Maybe they weren't at the end of that sentence yet, but they were definitely at the start of it. "governed by surprise" yes. "receiving decisions deliberated in secret" very much yes.
Or did you mean Biden dropping out itself? I don't see how anyone could have reasonably offered more notice that he was dropping out - presumably there was a fairly rapid decline in health for him to make that decision after the primary.
> presumably there was a fairly rapid decline in health for him to make that decision after the primary.
That's a generous assumption that doesn't really fit with how he seemed in public appearances before and after. The alternative possibility is that the narrative where he drops out of the primary and so the D candidate "has to" be appointed at a time when it's "too late" for the public to be involved was a deliberate one.
At this point we're at "the democrats might have planned for a single surprise, under circumstances that would be both difficult and suspicious to repeat".
It feels... exceedingly charitable to say that is "habituating people to surprise" in any real sense. If anything, I'd argue it has had the opposite effect: if the Democrats pull a second surprise like this time any time in the next couple of decades, quite a lot of people are going to be outraged.
I'm not really sure why they'd want to skip the Primary anyway? If she failed to pass as a candidate there, it would be pretty clear evidence that she wasn't going to beat Trump. If she passed the Primary, she's got more support behind her. It's a lose/lose to do what you suggested
They can be very different, but still both push our governing structures and our thinking in directions that are not good for us individually or collectively.
To risk an analogy, if you're drowning and need assistance, you need some sort of flotation device, or a rope to get out of the water. If one person throws a heavy stone block at you, they're not helping. If a different person tosses you a metal chair, they're also not helping, even if they think they are. The objects are different, and the intent may even be different. But neither helps, and you are still drowning.
Examining that analogy in light of the electoral outcome, would you prefer to be in the timeline in which someone throws you a chair but there is a boat full of others who might throw you something useful, or the one in which someone has thrown you a heavy block, has drilled holes through the hull, and is actively pushing everyone else overboard?
They’re not both the same level of bad currently, I agree.
But they have both been consistently working to normalize their authoritarianism. I mentioned the 2020 protests in another sibling comment, which I think is a good example.
This is just the next step in an ongoing escalation, but yeah it is a big jump.
As a purely mechanical point: having a D president with R house and senate and supreme court is a very different situation to having R all across the board, which is why the "checks and balances" have stopped working.
I see what you're saying, but listening to partisan rhetoric on both sides here does not really get you any closer to the truth here.
If you were you were to look back at the political discourse in 1920s and 1930s Germany, you'd find extremely scathing critiques from the Nazis lobbied against the Social Democratic party. Did this mean that the two were equally bad?
While it's true that Biden's actions during his recent term were frequently called unconstitutional by the right – be it for trying to raise the minimum wage or forgiving student loan debt – it was rarely from a perspective of solidifying his executive power. In the case of the Trump v. United States, he was avowedly against how the ruling implicitly expanded his executive power.
On the flip side, Trump's openly pushing the expansion of his executive power with his firing inspectors general, overruling the senate by freezing funds and appointing his own pseudo-agencies that take control over independent agencies in the executive branch.
These are fundamentally different things, and should be treated very differently, even if people from either side complain about both.
Maybe passing it up the stack is the best way to handle it, but also maybe it’s better to handle it somewhere in the middle.
The thing that always happens with exceptions in API projects I’ve worked on, is that exceptions can come from any level of the stack, then by default it skips everything in the middle, and the controller has default handlers for what to do in case of an exception.
If there are exceptions you didn’t know existed because of some library or just complex code with dozens of possible exceptions? They still end up being handled in your controller. You need to know exactly what exceptions could happen at every level of the stack, and how to handle it, otherwise everything just short circuits.
With the go errors, you only need to know “did this function call work? If not, then what?”