News for hackers. Stuff that matters.
Re:Changing Python lambda syntax at runtime by wybiral on Saturday September 10, 2016 @06:00PM (#12471062)
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 by meddlepal on Saturday September 10, 2016 @06:04PM (#12471077)
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 by bthornbury on Saturday September 10, 2016 @06:10PM (#12471094)
This is somewhat against the zen of python, but then again "Beautiful is better than ugly." :)
Re:Changing Python lambda syntax at runtime by wybiral on Saturday September 10, 2016 @10:04PM (#12471721)
It's a neat concept. I also agree that the lambda statement in Python is ugly, but actually using this in a Python project feels wrong.

Not that you couldn't call it a "transpiler" and consider it a new dialect of Python... Hey, the Javascript community gets away with it, why not Python?

Also, while I can't think of a normal use case, it is possible that someone intended to use (a, b, c) > (x, y, z) as a tuple comparison. ">>" or something might be safer.

Re:Changing Python lambda syntax at runtime by bthornbury on Sunday September 11, 2016 @04:46PM (#12475625)
I agree in it's current state it's more of a novelty than something intended for serious use. (Imagine debugging someone else's code with source rewriting 0_0) Especially with the discrepancy you pointed out with tuple comparison.

I think that it could get to a state where if the debugging was figured out, and the abstractions/usability became nicer that it could be have some serious use though. Mostly the intention with this was to get something working, that can be iterated on if it makes sense.