197 karma · joined April 1, 2020
Wouldn’t this be true of almost any other selective interview process?
for i in range(0, m):
for j in range(0, n):
doInner()
doOuter()
A single tab here in the 4th line produces syntactically correct but logically incorrect code. I find this scary.I guess it would be easy to just write your own preprocessor that requires curly braces everywhere and removes them for the python interpreter, but eh.
I’m primarily a python user, but I spent time writing code in Ocaml to understand the potential benefits, but… (I would love to have my mind changed)… it feels like many of the features people touted about Ocaml have already made their way into python…?
1. Immutability / referential transparency seem more like nice-to-haves for a codebase, rather than the real reason people tout FP…?
2. Sum/product types and pattern matching are being added soon to python
3. Mypy is starting to gradually enable python typing, although I assume it’s still a work in progress
4. Python allows us to use map/reduce, and to pass functions around as arguments…?
I want to understand the potential benefits of FP more, but my experience with Ocaml hasn’t shown me great improvements yet. Open to having my mind changed.
This would make python both a viable choice for rapid prototyping, as well as easy to convert to much higher performance code (just by handling some typing conflicts), and potentially making python a mega-language used even more pervasively.
The only even mildly negative experience I’ve had was once a high-level user pattern-matched one of my questions to a much simpler already-answered question and closed it along with a dismissive comment, but as soon as I commented highlighting the discrepancy he apologized and answered my question.
Why were excellent C++ skills sometimes harmful?