4 ms·
Python has Abstract Base Classes, and also widely used zope.interfaces. These, along with simplicity, convention(pep8, frameworks), a stable base(stdlib), pack
by illumen 14y ago
Python has Abstract Base Classes, and also widely used zope.interfaces. These, along with simplicity, convention(pep8, frameworks), a stable base(stdlib), packages, a standard unittest framework, and a strong internet community help python code bases scale.
JavaScript is missing a stable base, packages, ABCs and interfaces, and a shared testing framework. However many of these are available within separate communities like for example the jQuery community. jQuery provides a stable base, plugins, a good community to share code, a standard testing framework, a way to extend code (plugins) to make it reusable, and now it has a module system which can be shared with other JavaScript frameworks.
I've been on 10+ JavaScript developer projects with 100+ developers over all. I've seen JavaScript code reused by one million+ developers. I've seen open source JavaScript projects with 100+ developers. So I have experienced myself that it can scale up to a certain point.
As long as the team has the best practice skills to do it that is. JavaScript is the ultimate spaghetti making machine in the hands of newbies without direction.
- mickeyp 14y agoThey can scale, but not every code base is well written. Operating from the assumption that best practices is always implemented isn't necessarily true. Sometimes you work with sub-par code or code that was written by someone skilled but due to time pressure; misunderstanding the requirements; or a poorly planned architecture means that it does not lend itself to scalability. That's the problem. You can refactor it, but refactoring code in Python can be a nightmare compared with tools like Visual Studio that make it a breeze -- plus you get the benefit of having a compiler catch errors for you. Well-thought-out code will always trump bad code; but that's a truism.