3 ms·
You can, but then none of the Python libraries that expect Python lists can use your Cons as a list. I tried. It sucks. The conversion becomes a problem all ov
by sillysaurusx 4y ago
You can, but then none of the Python libraries that expect Python lists can use your Cons as a list.
I tried. It sucks. The conversion becomes a problem all over the place.
isinstance(Cons(nil, nil), list) will fail, for example.
I posted a more thorough answer here: https://news.ycombinator.com/item?id=33194570 https://news.ycombinator.com/item?id=33194570
- phoe-krk 4y agoThis isn't a case of Lisp being hard to implement, this is a case of trying to make your Lisp work with Python language idiosyncrasies. These two issues have close to nothing to do with one another.
- Turing_Machine 4y agoPython...Python...Python... I think I see where your problem actually is.