Ask HN: What are some of the most elegant codebases in your favorite language?
Working with Perl, two things spoiled me for other languages: JSON and DBI/DBD.<p>In Perl, everything serializes to JSON without fuss.  It can be "lossy"; objects without an explicit JSON serialization method and coderefs can't be deserialized, but serializations at least have placeholders for them.<p>Compare to Python's json module, which doesn't try very hard to serialize things and throws exceptions every time it runs across something new.  It's very frustrating to use.<p>Perl's DBI provides a universal API for all databases, with implementation-specific details in an underlying DBD module (which both provides glue between the DBI abstraction and programmer access to features specific to different database systems).<p>Compare to Python, where you need to import a different module and use a different API for every different kind of database.  As I increasingly use Python for a living, I frequently wish they'd follow Perl's example with this.