Hacker News new | ask | show | jobs
by laumars 2793 days ago
My takeaway from that is it’s basically Go’s Stringer() but with a default method so even objects without String method can still return a string.

Quite a few languages have that kind of feature though I believe. PHP has print_r and var_dump, Perl 5 had Data::Dumper, Python has tools too which I forget the name of.

I like how Perl 6 has baked it into the language though rather than making it a part of the standard library.