1,657 karma · joined September 8, 2018
:)
How would that work? You want a nontail keyword to indicate that intent explicitly?
I guess I could imagine a scenario where you want to de-optimize a TCO into a non-TC... but I mean... that's got to be rare enough to just not bother with?
EDIT: Also, this is the exact opposite of your comment which I replied to. Make up your mind on what you want and we can maybe find a way to achieve it
I don't see any way around having to state your intent (as a programmer) for this. It's just a semantic difference in behavior unless your Abstract Machine allows for just ignoring the possibility of stack overflow entirely.
For that, we can just use a unique password per service. That's not really a thing for code.
Not that it matters when the file is so small in the first place... I'm just saying you should be sure what you're 'benchmarking'
For example, in ZFS the metadata is checksummed such that pointers to the data carry the checksum for that data.
TCO is more general than that in some languages where any function call in tail position can be turned into a direct jump. This obviously requires either 1) runtime support in some form or 2) a non-trivial amount of program transformation during compilation.
[0] Scala's @tailrec is one I'm 100% certain of.
It's incredibly frustrating and disheartening... For obvious reasons, I'm not going to go into too much detail, but chronic (non-visible) pain is the worst of the worst. People will either think you're "faking"[0] or it's "just psychosomatic"[1]. I actually relish being able to work for a good long day because I'm lucky enough to actually enjoy making computers do stuff.
[0] Yes, I love to miss lots of family occasions, just because.
[1] I'll just will myself better. Nevermind the MRI scans and all that.
EDIT: I should add... the cognitive biases at work are understandable because they've probably been around since proto-humanity, but that doesn't change the outcomes.
I think you may be misunderstand how optimization works. It's not "AHA! Undefined Behavior, I'll poke at that!".
It's more that compilers are allowed to assume that some things just "don't happen"... and can optimize based on that. And it does make sense... if you were told to optimize a thing given certain rules, how would you do it?
Have you worked in language with immutable collections by default? It's night and day -- no more defensive copies, no more weird ImmutableList wrappers (Guava) which will (interface-wise) say they're mutable but will throw at runtime, no worrying about multithreading, cheap subsequences, etc. etc.
The difference is so stark that I would literally choose a worse[0] language(!) over a better one if it had immutable collections by default.
EDIT: Since you mentioned Java in a sibling comment -- give Scala a try and try working with the collections there.
[0] Within reason, of course :)
EDIT: That said, I'm on the maintainer's side here.
No, you cannot. Catching, for example, StackOverflowError (which inherits from Error) can lead to very strange deadlocks and such (if locking is relying on try-finally discipline, as it should), even if you do "almost nothing" before re-throwing.
It's a huge hornet's nest of weirdness to even attempt to catch anything which derives directly from Error. (Rather than RuntimeException/Exception.)
EDIT: There are some really strange subclasses of Error now that I think about it. E.g. VirtualMachineError ... I don't think I've ever seen that in any logs, thankfully, but what exactly is the program (running on the failing VM) supposed to do if that is thrown? It'd be like trying to carry on or log an error if suddenly 1==2 turned out to be true.
EDIT: Oh, and as a sibling poster mentioned: A huge number of security vulnerabilities -- except now they can be purposefully injected by just posting random subtly-wrong code on the interweb. Not that you couldn't do that before, but reach would be much more limited unless you got your 'seemingly correct' code posted on SO.
You've also added (possibly substantial) latency to every single operation that operates on user data.
Why wouldn't that be possible? (The cursor thing)
It's still two characters as far as your editor is concerned.
That's not to say Philosophy has outlived its usefulness, but... it was probably more consequential 2000, 400 or 200 years ago, in practice.
(EDIT: I should add... there is also a lot of absolute dogwank in Philosophy too... but I think that's universal for any field, tbf.)