TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Lisp after Python after Lisp

70 pointsby thepanisterabout 16 years ago

2 comments

danpragerabout 16 years ago
Learning Scheme helped my Python by teaching me some new (to me) idioms, besides the first-class function stuff.<p>For example, it is natural in Scheme to declare a lot of local information, including local function definitions. These have the great advantage of knowing about variables within the local environment. So rather than declaring an external function with heaps of parameters to pass in local state, you just declare a local function which automatically gets access to the variables in the surrounding scope.<p>The same idiom works neatly in Python too, but didn't occur to me previously.<p>* * *<p>Also after learning Python and Scheme, Ruby felt a bit like a cross between the two, and quite comfortable.
评论 #512715 未加载
评论 #513020 未加载
jimbokunabout 16 years ago
"I don't know if there are programmers out there whose pseudo-language is functional. Maybe it's just human nature to think imperatively."<p>A lot of time it just kills me that "if" statements don't default to returning the true branch or false branch. You need the ternary conditional operator in Java and other C-derivatives, and in Python you need to resort to some hack with and/or precedence.<p>I'm also wondering if I should declare all variables final in Java, and only change that default if I really, really have to.
评论 #512645 未加载
评论 #512607 未加载