2,540 karma · joined November 22, 2016
If anything, I’ve found it’s more useful when I want to bypass such wrapping to force a class to use some particular memory (like from a bulk allocation). The STL is pretty good, but there are warts that which still force the default heap allocator like std::function.
Who is arguing this? Usually, if I'm adding a comment on why something is done a particular way, it's something that is going to take at least a full sentence to explain if not a whole paragraph.
In terms of actually using SQL more effectively, I think the ideal is just a small utility to use reflection and map a ResultSet (or equivalent) into a strongly typed object using reflection.
Even inserts can get tricky because there are so many different knobs you can tune. It's pretty rare that people just need to insert into a single table with no additional selects beforehand which means there is room to play around with preemptive locking, isolation level, etc.
If you want to analyze it algorithmically, you probably need to start looking at topology or something so that you can correctly relate musical structures in a way that is resistant to transposition.
I’m kind of convinced that if there is a symptom, our brains can probably cause it.
If none of this makes sense, don't worry, that just means you don't work in enterprise...
It's completely different than the story with tail recursion which can be essentially reduced to syntactic sugar over a normal loop (just change the parameters to be mutable variables).
function logAndCall(statement, func) { console.log(statement); return func(); }
Tail call optimization is actually possible here since we call func in "tail position". It might be unlikely to blow up the stack, but it can definitely happen if you do a lot of continuation passing.
Perhaps more commonly for C++/Rust, tail call optimization would be enormously valuable to have behind the scenes for destructors. It's actually very difficult to implement a linked list in safe Rust that doesn't explode the stack for large lists since no TCO is done for destroying subobjects. You can still avoid stack overflow, but you have to do things like manually enumerating the list.
I think this also extends to sex. With glasses, you can just take them off once you're ready and then afterwards you can just go to bed right afterwards if you want to. With contacts, you need to make sure you take them out before going to sleep.
I have no idea why they're so expensive at most vendors. It shouldn't be cheaper for me to order glasses without insurance. That said, the cost breakdown I saw from Zenni definitely showed that the major cost was for the lenses and given that they seem to be the cheapest vendor, I suspect they're actually telling the truth. Lenses seem to be pretty complex as well to manufacture, even for simple prescriptions.
However, I totally agree that eye surgery is probably the best option since then you don't have the downsides of either contacts or glasses. The only reason I'm hesitant to do it is because my prescription isn't that strong and I've heard it can mess with your close up vision later in life. But for someone with severe issues, fixing the myopia and then just using reading glasses as needed is definitely a huge QoL improvement.
Another random comment: I just love that his contacts apparently only fit because of ptosis from using weed.