3 ms·
What do you find is missing?
by montrose 9y ago
What do you find is missing?
- flavio81 9y agoI do like Python, a lot, but you asked for it... the list is long! - true, effortless metaprogramming - speed close to C by use of type declarations and fixed arrays; this means up to 100x faster than CPython. No, PyPy, Jython and Cython don't get quite there. - no Global Interpreter Lock! - the condition-restarts error handling system, which is deluxe error handling and recovery from errors. - a very flexible type system, plus very strong typing. - an extremely powerful object oriented system (CLOS) -- light years ahead of most OOP systems including Python. This means, having multimethods/multiple dispatch, method combinations, around/after/before methods, multiple inheritance, and a MOP. - true lambdas, not Python's one-line joke lambdas. - true interactive development, able to compile functions on the fly and thus change them while the code is running. Able to redefine classes while the code is running. - able to call Java libs and C libs at the same time, with ABCL - will run on many platforms and in the JVM without modifications to the code - separate namespaces for functions, vars, keywords and everything - tail call optimizations - something like Quicklisp (pip isn't as good) - built-in rational numbers, complex numbers, using the same operators for regular numbers - the LOOP macro, which I find better than Python's list comprehensions.
- montrose 9y agoThank you, this is very interesting. In what way are Python's lambdas restricted? Do they literally have to fit on one line? Do you have to use a separate version of + to add complex numbers in Python? Do you prefer loop because it's more concise or because you can say things you can't say in Python? Can you give me a couple examples of things that work better with loop? (As you can tell from my questions, I don't know much about Python, but as a Lisp hacker I'm curious about other Lisp hackers' view of it.)
- cmcaine 9y agoPython lambdas cannot contain statements, only expressions. Typical python contains a lot of statements, so that's a bit annoying. You can define inner functions and so on, and most of the times that I want to use lambdas it's just because I've been stuck in a language without *-comprehensions for too long. + works fine on complex numbers. I'm not super familiar with the loop macro, but it lets you do both things similar to a python comprehension and to a python for loop. I don't think it does anything you can't do in python.