Apr. 27th, 2009

jducoeur: (Default)
... 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...
jducoeur: (Default)
... 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...

Profile

jducoeur: (Default)
jducoeur

June 2025

S M T W T F S
12 34567
891011121314
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags