Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Amen to that. I try to write mostly functional Python, but I use a lot of temporary variables to make such things as f(g(args) more readable where each arg is in itself a non-trivial computation that must be passed along to another function.

The problem with your let strategy is this can also impair readability if you use too many as the code becomes too far indented to the right (lets inside of lets inside of lets).

But I guess in these situations you can just use transients that are first defined to nil. Some people will probably yell at you for this.

http://clojure.org/transients



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: