News for hackers. Stuff that matters.
Re:Python past, present, and future with Guido van Rossum [a... by tim333 on Thursday February 23, 2017 @07:58AM (#13713469)
I first came across that as a school kid (in BASIC) and didn't find it confusing at all. I still find functional computing confusing - I mean to do something for the numbers 1 to 100 instead of for x = 1 to 100 you have to do some weird tail call recursion which if you are lucky the compiler then converts back to for x = 1 to 100 because that's how processors work efficiently.
Re:Python past, present, and future with Guido van Rossum [a... by willtim on Thursday February 23, 2017 @08:10AM (#13713517)
I learnt BBC Basic before my high-school algebra and was certainly confused by the different meanings. Don't concern yourself with tail recursion if you are still learning FP, it's just an optimisation, nothing to do with semantics. Python doesn't have it and few people care. What do you want to do with the numbers 1..100? A for loop doesn't give me any hints, which is part of its problem.
Re:Python past, present, and future with Guido van Rossum [a... by lmm on Thursday February 23, 2017 @08:45AM (#13713764)
Don't bother thinking about what the processor is doing. Just trust it to figure it out. Tell it what to do (which shouldn't involve "weird tail recursion" - rather you probably want to use "map" or similar), and let the runtime/processor do it for you. If and when it turns out to actually be too slowly, and you profile it and can't immediately see why, then you're allowed to worry about that kind of thing. Not before.