Live data from Hacker News

Changing Python lambda syntax at runtime

github.com

1–10 of 25 posts

Re: Changing Python lambda syntax at runtime

#2
Python users are essentially discovering what Lispers have known all along - code is data. Once you fully comprehend that idea, you'll never be bothered by Lisp's odd syntax because of the freedom in expressibility it gives you.

There are some fantastic Python hackers out there (some who know Lisp, others who don't) and this is a logical step in the progression of any developer. Eventually, they'll rediscover continuations too. But, as long as Python is not homoiconic, it will never be as simple to express these ideas as it is in Lisp.

Re: Changing Python lambda syntax at runtime

#3
post #2

Python users are essentially discovering what Lispers have known all along - code is data. Once you fully comprehend that idea, you'll never be bothered by Lisp's odd syntax because of the freedom in expressibility it gives you. There are some fantastic Python hackers out there (some who know Lisp, others who don't) and this is a logical step in the progression of any developer. Eventually, they'll rediscover continu…

I breathe python but have a passing knowledge of Lisp (CL specifically). The one thing I've found is true is the deep extensibility of lisp means every dev is capable of rolling their own thing, thus, just the way things are done in lisp varies from hacker to hacker. Python on the other hand enshrines the idea of having "one way to do it" as part of its values. This is what makes Python pretty uniform across most devs from what I've seen. That seems opposite to the CL way in value and in practice.

Re: Changing Python lambda syntax at runtime

#4
post #2

Python users are essentially discovering what Lispers have known all along - code is data. Once you fully comprehend that idea, you'll never be bothered by Lisp's odd syntax because of the freedom in expressibility it gives you. There are some fantastic Python hackers out there (some who know Lisp, others who don't) and this is a logical step in the progression of any developer. Eventually, they'll rediscover continu…

My understanding is that the python designers have intentionally made this sort of functionality challenging to use, under the assumption (which I agree with) that that sort of dynamic metaprogramming can result in code that can be very challenging or even nearly impossible to follow or understand.

While lisp-y dynamism can let you do really cool things in very little code, it also lets you do completely incomprehensible things in very little code. Python has intentionally chosen to disallow the first to prevent the second.

Re: Changing Python lambda syntax at runtime

#6
post #2

Python users are essentially discovering what Lispers have known all along - code is data. Once you fully comprehend that idea, you'll never be bothered by Lisp's odd syntax because of the freedom in expressibility it gives you. There are some fantastic Python hackers out there (some who know Lisp, others who don't) and this is a logical step in the progression of any developer. Eventually, they'll rediscover continu…

My understanding is that the python designers have intentionally made this sort of functionality challenging to use, under the assumption (which I agree with) that that sort of dynamic metaprogramming can result in code that can be very challenging or even nearly impossible to follow or understand. While lisp-y dynamism can let you do really cool things in very little code, it also lets you do completely incomprehens…

Agreed. Python has also pushed the mantra: "There should be one-- and preferably only one --obvious way to do it".

Don't get me wrong, I love lisp, but it gives you the power to essentially create your own domain-specific language. A power that comes with both positive and negative side effects depending on the situation.

Re: Changing Python lambda syntax at runtime

#7
post #5

I wonder why an article like this is not in a blog or medium or in same place made for articles instead in a source code repo.

Why do you believe a blog is any more suitable than a GitHub repository? If anything I probably prefer the GH repo since it's less likely to be click bait designed to drive views to some guys blog for the purpose of self promotion BS.

Re: Changing Python lambda syntax at runtime

#8
post #6

Earlier quoted context omitted.

My understanding is that the python designers have intentionally made this sort of functionality challenging to use, under the assumption (which I agree with) that that sort of dynamic metaprogramming can result in code that can be very challenging or even nearly impossible to follow or understand. While lisp-y dynamism can let you do really cool things in very little code, it also lets you do completely incomprehens…

Agreed. Python has also pushed the mantra: "There should be one-- and preferably only one --obvious way to do it". Don't get me wrong, I love lisp, but it gives you the power to essentially create your own domain-specific language. A power that comes with both positive and negative side effects depending on the situation.

Which honestly if you want a block-style Lisp, basically you're asking for Ruby. And the differences between Ruby and Python IMO aren't that big.

Edit: Heh, just realized there is another article on the front page arguing this.

Re: Changing Python lambda syntax at runtime

#9
post #5

I wonder why an article like this is not in a blog or medium or in same place made for articles instead in a source code repo.

Github seemed like an easy place to put the markdown.

I didn't see a real benefit to sticking it somewhere else, why do you think that is more desirable?

Re: Changing Python lambda syntax at runtime

#10
post #2

Python users are essentially discovering what Lispers have known all along - code is data. Once you fully comprehend that idea, you'll never be bothered by Lisp's odd syntax because of the freedom in expressibility it gives you. There are some fantastic Python hackers out there (some who know Lisp, others who don't) and this is a logical step in the progression of any developer. Eventually, they'll rediscover continu…

I can't say I'm familiar with lisp, but I have had long conversations about it with a few friends who are enthusiastic about it's use.

I thought of lisp after making this and thought it would be nice to build some python abstractions that can make this feel a little more usable. For the moment it does seem challenging, and I agree it will likely never be as simple as lisp.

Post reply on HN