{"action":"closed","issue":{"url":"https://api.github.com/repos/lodash/lodash/issues/1043","labels_url":"https://api.github.com/repos/lodash/lodash/issues/1043/labels{/name}","comments_url":"https://api.github.com/repos/lodash/lodash/issues/1043/comments","events_url":"https://api.github.com/repos/lodash/lodash/issues/1043/events","html_url":"https://github.com/lodash/lodash/issues/1043","id":60802578,"number":1043,"title":"Simpler but longer function names for FP newbies","user":{"login":"koresar","id":1622575,"avatar_url":"https://avatars.githubusercontent.com/u/1622575?v=3","gravatar_id":"","url":"https://api.github.com/users/koresar","html_url":"https://github.com/koresar","followers_url":"https://api.github.com/users/koresar/followers","following_url":"https://api.github.com/users/koresar/following{/other_user}","gists_url":"https://api.github.com/users/koresar/gists{/gist_id}","starred_url":"https://api.github.com/users/koresar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koresar/subscriptions","organizations_url":"https://api.github.com/users/koresar/orgs","repos_url":"https://api.github.com/users/koresar/repos","events_url":"https://api.github.com/users/koresar/events{/privacy}","received_events_url":"https://api.github.com/users/koresar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lodash/lodash/labels/documentation","name":"documentation","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-12T11:07:12Z","updated_at":"2015-03-13T00:21:28Z","closed_at":"2015-03-13T00:21:28Z","body":"> Programs must be written for people to read, and only incidentally for machines to execute. \r\n[(c)](http://www.goodreads.com/quotes/9168-programs-must-be-written-for-people-to-read-and-only)\r\n\r\nAnd\r\n\r\n> There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors.\r\n[(c)](http://www.randomprogramming.com/2014/09/quote-of-the-week-hard-things/)\r\n\r\nI know most of the lodash function names are well known functional style names. Although, lodash has about 300 functions. Remembering what they do is kind of hard. I keep lodash docs website opened without closing it for few months already.\r\n\r\nTrying to teach a student I always find that it's really hard for them to remember what some of the lodash functions purpose is. Map and reduce names is something people can remember. It's good you introduced new `all` and `any` aliases. But there are few very short misleading names. Especially for newbies.\r\n\r\nExamples. (It's just a quick list. I did not think about the names much.)\r\n\r\nArray:\r\n* `_.rest` -> the better name would be `_.allButFirst`.\r\n* `_.zipObject` -> `_.composeObject`.\r\n* `_.reject` -> `_.allBut` or/and `_.filterNot`.\r\n* `_.sample` -> `_.pickRandom`.\r\n* `_.after` and `_.before` -> `_.invokeAfter` or `_.callBefore`.\r\n* `_.ary` -> confusing as hell. `_.acceptMaxArgsNumber`. Yeah, a very long one.\r\n* `_.bindKey` -> `_.bindObjectFuncToArgs`\r\n* `_.curry` -> `_.waitAllArgs`.\r\n* `_.flow` -> too generic name. `_.invokeSequential` or kind of would be more clear.\r\n* `_.momoize` -> `_.cacheCallResult`.\r\n* `_.once` -> `_.invokeOnce`.\r\n* `_.rearg` -> `_.rearrangeArguments`.\r\n* `_.functions` -> `_.getObjectFunctions`.\r\n* `_.invert` -> `_.invertKeysWithValues`.\r\n* `_.keys` -> would be good to have alias `_.ownKeys`. Same for `_.ownValues`.\r\n* `_.keysIn` -> same reasoning, `_.allKeys`. Same for `_.allValues`.\r\n* `_.mapValue` -> this one is very clear actually. I wish all the rest were like it.\r\n* `_.omit` -> `_.cloneExcept`.\r\n* `_.pick` -> `_.cloneOnly`.\r\n* `_.pair` -> `_.keyValuePairs`.\r\n* `_.attempt` -> `_.getResultOrException`.\r\n\r\nI understand that JS code doesn't like long names because traffic and typos. Although, people do better (functional) programming when function names do not allow many interpretations.\r\n\r\nI am looking for a way to solve this issue. Any ideas?\r\n\r\nP.S. I understand that I can create and maintain a separate module like \"lodash-long-names\". `require('lodash-long-names').assignAliases(_);`. Although, I think it's better to keep lodash activities under the same brilliant umbrella of @jdalton."}}