I'm looking to collect information on why certain functionality found in Erlang/OTP is usually handled instead by a third party library in people's projects.
This could be bugs, missing functionality, poor interface, performance, etc.
Examples off the top of my head that need expanding on are:
- httpc
- httpd
- http_uri
- reltool
Please comment on this gist with libs and reasons, even if you aren't sure they are accurate or still accurate today.
A couple of items and gotchas:
crypto:strong_rand_bytes/1
is icky. Modern advice is either to use a dedicatedgetrandom()
call (arc4random_buf()
on OpenBSD) or use/dev/urandom
(with the caveat that you must wait until/dev/random
exists as a device). It is not a priori clearstrong_rand_bytes/1
gives these guarantees.rpc
module doesn't scale. People learn this the hard way.xmerl
module have several problems. Most importantly it leaksatom()
values so an enemy can overfill your atom table using it. For backwards compatibility it also usesstring()
data which often gives memory pressure problems when processing large XML documents.array
module implements persistent arrays. People often want mutable arrays, which they can't get and thus people resort to NIF implementations.mnesia
assumes certain things which is in stark contrast to the environment in which most Erlang systems are running. I've seen people latch onto it in situations where a simpleeleveldb
plug is enough to handle persistence.Inverse problems:
sofs
is and then they skip it, even though it can simplify lots of code.