2,153 karma · joined December 7, 2013
A new implementation of a ThingDoer usually needs to do something more/different from a StandardThingDoer... and so may need to throw more types of exceptions. So you end up having to wrap exceptions ... but now they don't get caught by, say, catch(IOException exc). If you're lucky you own the ThingDoer interface, but now you have a different problem: It's only JDBCThingDoer which can throw SQLException, so why does code which only uses a StandardThingDoer (via the ThingDoer interface) need to concern itself with SQLException?
Checked exceptions in Java are worse than useless -- they actively make things worse than if there were only unchecked exceptions. (Because they sometimes force the unavoidable wrapping -- which every place where exceptions are caught needs to deal with somehow... which no help from the standard "catch" syntax.)
It's also a good way to make bugs proliferate throughout your code base. IIRC bug count correlates well with line count regardless of the language(!).
I'd wager it'd be much better to just specify that abort() gets called in the "overflow" case. (Given that overflow is basically never what you want anyway.)
Yeah, it'll crash but at least it won't be suprising/undefined behavior.
I'm surprised than anyone thinks this. Unless you're in a very specialized area, it's about as useful as getting practice with writing algorithms using Turing Machines.
(Yes, it offers a very different perspective to the usual Von Neumann machine, but learning graph reduction as evalation is just as valuable, if not more.)
(Of course this means that one is probably not always going to do "production ready" things, but it's for fun, so it doesn't really matter. Sometimes it's fun to just go nuts and sprinkle "undefined"[1] all over the code base and just go from types to implementation as fast as humanly possible.)
[1] This is a Haskellism, but basically means any of:
assert(false)
throw new NotImplementedException(...)
???
etc.EDIT: Just to clarify: As long as disasters happen slowly enough and there are actually local maxima for the species to evolve "into", everything may be fine for "humans"... but those assumptions may be overly optimistic.
(It may not be math that applies to the real world, but math being math is eternally valid as long as the axioms hold... and sometimes you get surprising applications later on.)
My point wasn't so much that I had the perfect solution and that I'd thought of everything. It's that there are much better systems and that we should actually strive to get there.
This is an area where the design of Java/JVM is badly screwed up.
[1] JVM, really. It's pretty unavoidable on most (all?) JVM languages.
Obviously there's so much inertia in the existing system that it could realistically never happen at this point, but one can dream, right?
[0] Kind of like e.g. /etc/services but with UUIDs.
"Order total: undefined" is hugely different from "There was an error -- maybe just leave the page, yeah?".
I do know that, as a non-native English speaker, I've always appreciated having English subtitles for English-speaking films. It helps immensely if you miss a word, there's a little too much mumbling, or whatever. One of the best (in both ways) examples being the movie Snatch.
There's a huge amount of 'interesting' things one can do which are illegal, immoral, depraved and worse. (I'd argue that stealing is generally at the very least illegal and immoral, but opinion may vary depending on who the 'injured' party is.)
It has everything to do with sandboxing (or not). Ads being served by third parties should not be able to influence the JS running in the page.
Here's a little thought experiment: Your program ends up with an "undefined" in some variable 'x'. How did that happen? In JS it can happen in any number of weird and wonderful ways, e.g. you called a function which did a 'v[i]' or it could have just fallen off the end because someone forgot to check a return path, or...
In Python there's much less scope what the problem could be. Since v[i] will just throw an IndexError, you know that the problem couldn't possibly be stray index or similar.
That is a much better experience for finding problems in one's code.
> I’m not sure why you’re mentioning women historically being keepers of the house It’s not relevant to the topic, people in general don’t value that role anymore.
My point was in the asymmetry -- so I found it odd that the blog author (not you!) would point to this as somehow being evidence of "loss of meaning".
> The role is eroding because the expectation is, that regardless of gender both partners in a relationship need to be working.
Why would both partners working be a problem in the first place? What about socialized (gasp!) child care?
Obviously, you'll want both parents to be spending as much time as possible with their children, but the underlying problem here seems to be... money. If there were less pressure to earn then maybe both parents could change to a 3-4 days work-week, etc. etc.
(EDIT: I'll actually add a counter-point to my own assertion here. It may not actually be the case that spending more time with one's children is always better. There may be a Goldilocks zone.)
> This is to facilitate the rising cost of a raising family in large city environments.
I think I understand the symptom. Cost means money.
Obviously, things will have to change on a massive scale for "my" conception of the future to be feasible everywhere, but I still understand what this has to do with meaning (as your original blog post was about).
> We're watching the entire meaning infrastructure in this country be destroyed. >
Ok, so we're clearly in a very US-centric context here.
> 1.Religion is going away.
> [Sidebar:] As an atheist I think there is a lot of good that comes from discarding religion, but as a humble realist I also need to acknowledge the downsides.
What downsides? Please state them explicitly. (I could read this as a conceit to the general political climate in the US where atheists seems to be viewed unfavorably by the majority.)
> 2. Most people will not have a good job or a good paycheck.
Clearly some type of Basic Income type system will eventually become necessary as more and more things are automated. That, or we figure out what purpose the concept of money actually serves and come up with a better implementation.
> > 3. Being a homemaker is no longer considered meaningful for a lot of parents.
I don't understand how you can claim that this is "destroying meaning"?
Let me ask a pointed question: Who do you envision as being the homemaker -- the wife or the husband?
> > So where is the meaning coming from?
I get the feeling that either I'm completely missing the point of what you're writing, or you're writing from a pretty "conservative" position.
(EDIT: HN is really absurdly shit at quoting others. I'd apologize for my bad formatting, but I really don't understand how this shoddiness is acceptable in any world. Anyway, I did my best and will probably proceed to try to delete my account at this point.)
Then you come up with the "solution" that everybody must always check for NULL pointers before dereferencing them. If everybody always did that we might as well just define the behavior of reference-after-free, because what you said either a) requires you to keep a reference count (or null-check before every deref which may be even more expensive) at runtime(!), or b) requires a program-level proof.
So... no. What you suggested is not a solution in any meaningful sense.
A lot of Chrome traffic is already QUIC-based[1], and I think people will be pissed off it their experience is suddenly degraded because some asshole ISP decided to wholesale drop UDP over TCP.
Regardless of any of that -- the only way forward for privacy is end-to-end encryption and QUIC helps achieve that, up to "secret key availability"[2].
[1] I think Firefox is also experimenting with it?
[2] That is, any entity serving you a page must have the right secret keys. This is basically the case with SSL-only web sites already.
Well, many do. You wouldn't believe the number of broken HTTP clients/servers out there.
The difference is that most HTTP clients/servers have to work with some significant subset of the pre-existing HTTP infrastructure (otherwise why would anyone use them?) and so that constrains their implementation to be "mostly correct". It's literally network effects :).
Libraries on the other hand usually start out with a single consumer and have no such constraints on their implementation so you end up with various levels of ossified brokenness or breaking non-ossification.