Live data from Hacker News

Kill hashtables, get shorter code.

herdrick.tumblr.com

41–46 of 46 posts

Re: Kill hashtables, get shorter code.

#41
post #36

Earlier quoted context omitted.

I dunno. Exceptional though they may be, I can imagine situations in which it would be a net gain to write mp rather than map . I don't think "readability" should only mean "readable by someone who is unfamiliar with the program's conventions and is encountering it for the very first time". It does mean that, but it should also encompass "readable by someone who is working with the code repeatedly, as if it were clay…

Reducing the size of a program by an order of magnitude requires better abstractions, not shorter selector names. I'm not saying names have to be long, I'm saying they should be whole words, not abbreviations of words. The English language is full of whole words that are still very short. Math notation is horrendous by the way, too many implicit assumptions about the readers background knowledge. See what Gerry Sussm…

[flagged]

Re: Kill hashtables, get shorter code.

#42

Earlier quoted context omitted.

That might be true if your users were a blank slate, but they aren't, they have existing language skills and it's easier to remember words from ordinary language than it is some library writers abbreviation. Nor all all words arbitrary collections of letters, most words have some form of alternating consonant vowel structure that makes them easy to speak and remember. Write a program that just arbitrarily combines le…

map is already a short identifier and a real word This is heresy, but I actually think it might be better if it weren't a real word. I find I benefit from inventing names for functions or data abtractions. It helps to clear the mind of what those things might be. Plus making map into mp or whatever makes it much more googleable. And don't get me started on Clojure having map and a Map.

I don't care if you invent words, if you call your function zork that's fine, it's still a pronounceable word. When I say real word, I mean it has consonants and vowels and is speakable. It's abbreviations that annoy me.

Re: Kill hashtables, get shorter code.

#43
post #41

Earlier quoted context omitted.

Reducing the size of a program by an order of magnitude requires better abstractions, not shorter selector names. I'm not saying names have to be long, I'm saying they should be whole words, not abbreviations of words. The English language is full of whole words that are still very short. Math notation is horrendous by the way, too many implicit assumptions about the readers background knowledge. See what Gerry Sussm…

[flagged]

Not my intention.

Re: Kill hashtables, get shorter code.

#44

Earlier quoted context omitted.

map is already a short identifier and a real word This is heresy, but I actually think it might be better if it weren't a real word. I find I benefit from inventing names for functions or data abtractions. It helps to clear the mind of what those things might be. Plus making map into mp or whatever makes it much more googleable. And don't get me started on Clojure having map and a Map.

I don't care if you invent words, if you call your function zork that's fine, it's still a pronounceable word. When I say real word, I mean it has consonants and vowels and is speakable. It's abbreviations that annoy me.

Really? OK, that's interesting. I guess I prefer speakable ones too.

Re: Kill hashtables, get shorter code.

#45

Earlier quoted context omitted.

I don't care if you invent words, if you call your function zork that's fine, it's still a pronounceable word. When I say real word, I mean it has consonants and vowels and is speakable. It's abbreviations that annoy me.

Really? OK, that's interesting. I guess I prefer speakable ones too.

Agreed all around. Whether or not a name sounds right when you say it is one of the criteria we use on our project for naming design ideas. If you're interested in the rationale behind this, Eric Evans' book Domain Driven Design articulates a concept of design as the "ubiquitous language" of a project that I have found very useful.
Post reply on HN