3 ms·
I have to disagree with the Javascript design issues. I've used both Python and Javascript for years, and the more I use Javascript the more I realize how ad h
by zackbloom 13y ago
I have to disagree with the Javascript design issues.
I've used both Python and Javascript for years, and the more I use Javascript the more I realize how ad hoc Python really is. So many of it's features (metaclasses, raising an exception to break iteration, the MRO, the import behavior, etc.) seem to be hacky solutions to problems of it's own making. Javascript is a much smaller, and therefore simpler language.
- ak217 13y agoTo each their own. I really dislike Javascript, and while Python is not perfect, at least it has the right set of core values and a community process that results in tangible improvement. I mean, you're complaining about the finer points of Python OOP - to me, Javascript OOP is broken, and there is no community standard to fix it. What's wrong with raising exceptions to break iteration or with the import behavior?
- est 13y ago> raising an exception to break iteration You don't have to. def mygen(): yield 1 yield 2 return print "never been here" >>> list(mygen()) [1, 2] I agree some parts of python are hackish though. Maybe because of legacy reasons. And py3k didn't fix all of them