Naming Things Poorly

computer scientists have a very unfortunate way of naming things. Take S-expressions for example. They’re pretty a fundamental notation method for functional programming. I was re-implementing a variant of it recently, and obviously I named the package sexp

Part of the implementation I wrote was that I had a “shortcut” way of representing the S-expressions internally – as slice (called List) and atoms, instead of actually making a linked-list (because child node access was faster, given that most of the trees are static). But sometimes typos happen, and when they do, they read so awfully:

func join(s sexp.Sexp) error {
...
    for _, child := range sList {
        childList := child.(sex.List)
    }
}
comments powered by Disqus