Programming protip: NAME THINGS. Your long run-on chain of method calls is not “more l33t”. It’s harder to read.
-
-
-
Replying to @puffnfresh
@puffnfresh Your face is harder to read. Also it isn’t named. Coincidence?2 replies 0 retweets 0 likes -
Replying to @djspiewak
@djspiewak@puffnfresh you wouldn't think names were useful if you saw the demented nomenclature I used.1 reply 0 retweets 1 like -
Replying to @bitemyapp
@bitemyapp@puffnfresh val a = xs map (1 +) val b = a filter { _ < 10 } val c = a reduceOption { _ + _ } val d = c getOrElse 0 d#fail2 replies 0 retweets 0 likes -
Replying to @djspiewak
@djspiewak@bitemyapp Warning: Defined but not used: `b'1 reply 0 retweets 0 likes -
Replying to @puffnfresh
@puffnfresh@bitemyapp :-) So, naming allows you to group and label chains of computation. Also makes it easier to refactor later.1 reply 1 retweet 0 likes -
Replying to @djspiewak
@djspiewak@bitemyapp now try it without names, will you hit the "defined but not used" problem?1 reply 0 retweets 0 likes -
Replying to @puffnfresh
@puffnfresh@bitemyapp :-) My example was clearly facetious. I was pointing out how *not* to break things up by name.2 replies 0 retweets 0 likes
@djspiewak @puffnfresh It just seems to flow more nicely. The intermediate steps often seem artificial, and forced.
-
-
Replying to @propensive
@propensive@puffnfresh Right. I think my point though is that not all computations flow best with anonymous intermediate steps.1 reply 0 retweets 1 like -
Replying to @djspiewak
@djspiewak@propensive@puffnfresh also, you know, LOGGING!2 replies 0 retweets 0 likes - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.