8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions
comment 4y ago · link · parent
If you receive no replies or other feedback you would have no way to know if your comment was ever read by anyone. This differs from the real world where you can usually determine by various cues that someone heard you.
comment 4y ago · link · parent
Pike slapped his Newsqueak's CSP paradigm on top and the rest is history.
comment 4y ago · link · parent
But, I'm not sure that is even the primary benefit. The primary benefit is that you won't be incentivized to leave unused imports and variables to litter your code, as I see happen all the time in languages that aren't so strict. The Go team has even stated that they decided there would be no warnings because they've learned that warnings get ignored.
comment 4y ago · link · parent
But other layers of abstraction lose their utility value if they start to make assumptions about the caller. Maybe in your web service a 50x stop the world error is all you'll ever need if there is a database error, but the next guy using the code for another purpose could have very different requirements and when you have to actually deal with errors, exceptions become a royal pain very quickly. As such, the official line is simply that you shouldn't let errors casted to exceptions cross package boundaries.
But, again, Go isn't really designed for stop the world programming and it's okay to use another tool if your problem space is suited to stopping the world.
comment 4y ago · link · parent
My job primarily requires thinking about errors. It is why I wish for Go-style errors in the languages I use.
But on rare occasions I write things like batch scripts, automations, etc. in which failure means addressing the issue in realtime and trying again. There you don't care much about errors other than ensuring that the world stops when an error occurs to allow you to fix the problem before continuing.
While contrived, if you run into a "client A attempted to purchase item B which is limited to client C" error in this space you're probably going to have to phone them up and tell them that you can't process the transaction, apologize for the mistake, remove record of their purchase, and then once complete run the script again. The program crashing with an error message is sufficient here.
Different tools for different jobs.
comment 4y ago · link · parent
I believe Go could be a really great fit for UIs, but likely never will be as there is little economic incentive to put in the incredible heavy lifting required to build up the support libraries. There are certainly some small projects trying, but without massive resources backing it, it is a struggle to achieve the full fit and finish that we've come to expect.
comment 4y ago · link · parent
It is possible that with other error-related features added to the language you could avoid those traps, but Go doesn't feature those either, so simply adding that construct without thinking about the problem much more deeply doesn't buy you much.
If you are solving a stop the world when you encounter an error-type problem that might be okay, although I'd argue that you may as well panic instead. But, again, Go isn't designed for those problems and I'm not sure it needs to be. There are already plenty of good languages designed for that type of work.
comment 4y ago · link · parent
First it would need to add error handling before it could look to improve upon it.
I'm not entirely convinced it should. I spend my days in a variety of other languages that have added error handling in various ways and, in my experience, it always ends up making errors unnecessarily difficult to do deal with. I regularly wish the idioms of those languages recognized errors as being core to your application as any other value, not something to treat differently. Go really got things right for the type of software I write.
But not all software is solving the same problems. There are a lot of programs where you don't need to think about errors; where stopping the world is fine if you encounter one. Go is not at all a good fit for these situations. However, I think it is okay for Go to not try to be all things to all people. We already have plenty of other good languages that serve other niches. Right tool for the job and all that.
comment 4y ago · link · parent
The downward pressure on their compensation will see the cost to build new homes come down and thus the market will trend towards affordable again? After all, like all things, the cost of a used home is a function of the cost of a new home.
comment 4y ago · link · parent
Frankly, how does anyone continue to work in any job? They all bring undesirable externalities of some sort. As a farmer, I'm one of the most evil people on the planet, or so they say, due to the externalities created by agriculture. Working for Facebook would be a huge moral improvement. But, what are you going to do?
comment 4y ago · link · parent
The advantage big business has is scale. Big business, by definition, has many more stakeholders. This means that big business will be disproportionately represented by the constituents. If those biases weren't made clear, and each constituent's position was taken at face value, then the unified front would appear stronger than it would actually be if each actor were acting without those biases.
> Shouldn't they stay true to the promises they made?
I'm not sure why you'd want them to. The state of the world is constantly changing and new information continues to flow in. You will be constantly reevaluating your position in the face of new information. A representative will respond to that.
Representatives know that some segment of the population honestly believe that they are mind readers and will offer up some examples of how they might try to read the minds of those who buy into that witchcraft to attract their vote, but marketing and reality are quite different.
comment 4y ago · link · parent
Well, it would be rather pointless to elect to hire a representative to represent you and then not take time to make your position known with them. They certainly are not mind readers.
And you can't realistically remove big businesses from citizenry as those who are stakeholders in big business are going to bias their position to what benefits their business. Business is people, after all. ByteDance certainly has stakeholders who are American citizens.
So we make a best effort to register those biases for the sake of transparency. The only real alternative, short of abandoning democracy entirely, is to leave it a mystery who talked to their representatives.
comment 4y ago · link · parent
Real life isn't without its own flaws, but the research shows an increase in mental health issues when social media is a factor. That increase is interesting, and worth studying, even if it is not the only place one can develop mental health issues.
comment 4y ago · link · parent
If you are a small team of developers that is no doubt a lot of unnecessary indirection. When you are small you can talk to each other and figure out how to create a service that returns the optimized results right away. At Facebook scale, if everyone tried to talk to each other there would be no time left in the day for anything else.
Conway's Law strikes again.
comment 4y ago · link · parent
Joins are one possible workaround to the n+1 problem. However, they push the problem into the application to unpack, which detracts from having a nice high level abstraction in the database for fetching data. The many queries of n+1 would be ideal if you had an ideal database. You are querying on behalf of many different entities so many different queries is conceptually sound. But since we don't have ideal databases...
That's not to say that joins don't have their place. In the relational model, joins are essential. But the n+1 problem happens when you are not working in the relational model.
comment 4y ago · link · parent
Which is a pretty big deal when you have practically the whole planet as users, many of whom are found where low latency is a luxury.
> but at the same time if your DB is hit 50 times to service that request, you still have a problem.
Maybe. Or when you are Facebook maybe you don't care. Just throw another datacenter at the problem.
> without actually improving anything else
They found it improved discoverability for designers and non-technical folk.
> That tradeoff seems like a tough sell to me
If your organization doesn't look like Facebook, I imagine it wouldn't sell. It's very much designed for a purpose.
comment 4y ago · link · parent
A recession will occur if they overshoot, however.
comment 4y ago · link · parent
Which stands to reason given that GraphQL was designed for talking to services, not data stores. It was built for BFF. The backend is responsible for talking to the data store, as usual.
[client] <-dynamic GraphQL query-> [GraphQL resolver] <-boring old RPC/REST/whatever-> {Set of backend services}
comment 4y ago · link · parent
That said, if you have rent control locked in, the choice is likely easy.
comment 4y ago · link · parent
It has been used to query the data model by some. Data is data at the end of the day. But that is not where it really shines and misses some of its advantages when the service layer is skipped.
comment 4y ago · link · parent
Communism is a thought experiment about how people might organize if we ever achieved post-scarcity. We haven't yet figured out how to achieve post-scarcity. We have absolutely no idea how to do it, if it is possible at all.
Quite different.
comment 4y ago · link · parent
comment 4y ago · link · parent
When it comes to legalese, if execution doesn't do what you intended it is their fault for not understanding what you meant correctly and they get punished for it.