2 ms·
Now you're getting into nuanced answers anyways Does it make sense to expose them. Yes, probably, if there's no cost to doing so (which is approximately what y
by gpm 6y ago
Now you're getting into nuanced answers anyways
Does it make sense to expose them. Yes, probably, if there's no cost to doing so (which is approximately what you said when you says "needs to handle unicode strings anyways").
Does it make sense to use the exposed dependency? That depends
- What is the cost of including an extra copy (high in wasm, low in server side containers)
- [Edit: Added] What is the cost of using the system copy (typically low, but non 0 performance impact)
- What set of symbols is more likely to be outdated?
- How many times are you going to run into issues where you are missing the dependency in the runtime?
- How expensive is it going to be to implement a different solution for every different runtime that exposes it in a different way?
- How likely is the runtimes API ever to change in a backwards incompatible way?
Most of the time, for things that are not downloaded just when the user tries to run them (i.e. websites), I think it doesn't make sense to use the exposed dependency, even if it exists.
- flohofwoe 6y agoAgreed. As always, the only correct answer is "it depends". But even considering those questions is probably much more effort than most application developers put into selecting their dependencies, unfortunately. There's also the question of scale. Currently, whether your calculator.exe is 50 KB or 5 MB doesn't matter much, trimming down the size towards 50 KB is a nice exercise and deserves praise, but is probably not even noticeable by users. 50 MBytes for a calculator deserves raised eyebrows, something must be wrong which should be investigated. 500 MB would be unacceptable IMHO. Even if users wouldn't complain, I would be deeply ashamed to produce such a turd of a program ;)
- setpatchaddress 6y agoYes, it depends in a very absolute sense, but for most cases, efficient use of memory is a hugely important factor in a large software system for performance. It’s worth doing an abstraction layer. ICU has a stable API, to the best of my knowledge.