|
|
|
|
|
by bibyte
2328 days ago
|
|
Yes, I meant the pseudo-code quality of Python (I wish Wikipedia would use Python as it's pseudocode :)). I completely agree that Python is pretty hard to implement. Perhaps you have heard that simple doesn't mean easy ? I could easily implement a Forth (or assembly) interpreter. But it isn't that easy to understand a big complex Forth program (compared to Python). Simple languages like Forth and assembly are too unstructured for me. |
|
From the top of my head, here's a list of things that were awesome in python's design:
1. Clean and concise syntax (whitespace, slices, rest and kwargs, multiline and raw strings, although both badly designed were ahead of the time)
2. good default builtin datatypes, with decent API (cf garbage like cons cells or STL)
3. in particular strings as immutable vector of bytes, no seperate character type (this got screwed up in python3 of course)
4. comparison on compound datatypes works out of the box
5. relative uniformity no value vs reference type; objects mostly just dicts, modules as well
6. repr and repl (both gimped, compared to lisp, but good enough to be super helpful in development), good tracebacks
7. anti-footgun conventions (notably: mutating functions return None convention; mutable -> no __hash__ convention; slicing copies convention)
Nothing in this list seems particularly hard on the implementor, but it's of course hardly exhaustive or unbiased. What things that you really like about python do you think are rather hard to implement?