Justin du Coeur (jducoeur) wrote,
Justin du Coeur

I like a community with a sense of humor...

... which is probably part of why I am so enjoying learning Scala. There's a dry but persistent wry humor throughout the discussions there, albeit *very* much programmer humor.

Current example: I'm currently reading Programming in Scala, the bible of the language. (Not the formal spec, but essentially the K&R equivalent -- well worth buying an e-copy and reading, if you're into programming languages. It's a dense but remarkably neat language, and wonderfully pragmatic.)

Anyway, section 8.9 describes Scala's limited but decently powerful tail-recursion capabilities. And the very last paragraph, after several pages, says,
Thus, tail-call optimization is limited to situations in which a method or nested function calls itself directly as its last operation, without going through a function value or some other intermediary. (If you don’t fully understand tail recursion yet, see Section 8.9).
Which may be the best way I've ever seen to underscore the point...
Tags: programming

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded