4 ms·
What do you mean? Is that considered too deep nesting? (I'm not trying to be sarcastic.)
by ra88it 13y ago
What do you mean? Is that considered too deep nesting? (I'm not trying to be sarcastic.)
- carbocation 13y agoIt means nikatwork is not going to like the aesthetics of lisp.
- nikatwork 13y agoI like Lisp. My problem with this code is not aesthetics. This logic is too deeply nested, by the time you hit the last conditional there is way too much going on[1]. Perl makes it especially nice to flatten logic due to RHS conditionals, eg "x++ if y;". Here is my two minute flattening job[2], it prob has syntactic errors but you get the gist. [1] http://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_or_Minus_Two http://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_... [2] http://pastebin.com/4TDVftpJ http://pastebin.com/4TDVftpJ
- kbenson 13y agoNeeds more maps and greps. :) Seriously though, I use maps and greps a lot now, often chained to transform a data structure from one type to another. I'm annoyed when I have to drop to a for(each) loop.
- deleted 13y ago[deleted]
- nikatwork 13y agoYeah maps are awesome! I only changed the conditionals and nothing else, to show how easy it is to flatten deeply-nested logic.
- deleted 13y ago[deleted]