3 ms·
I personally don't get surprised by POSIX to consider it's violating this "least surprise" principle. Instead, for example Java has given me much more surprise
by bayindirh 5y ago
I personally don't get surprised by POSIX to consider it's violating this "least surprise" principle.
Instead, for example Java has given me much more surprises, and at catastrophic levels. I was using Choco Solver [0] back in the day, and I created two instances of it, attached to different classes. Which is perfectly normal, right?
Somehow they've cross linked between these two instances, affected the results they have computed, and created persistent memory leaks which needed system reboots to claim back. Java should be immune to that, but no.
Preventing that needed to run only one instance of Choco, which limited my performance greatly. Luckily, the system had a queue/consumer structure, so running only one didn't need extensive changes.
[0]: https://choco-solver.org/ https://choco-solver.org/
- zvrba 5y ago> Java should be immune to that, but no. I can't comment on Choco, but no garbage collector is immune against programmer's mistakes. For example, it's easy to create leaks with observable pattern (short-lived observers not unsubscribing from a long-lived observable). IOW: know when to use weak references.