Posts

Showing posts from March, 2011

Python vs JS vs PHP for embedded systems

I've got a question about which programming language is preferable for developing websites in the embedded system (hence with some limited resources). Here is my small investigation in a table form.PythonJS (node.js)PHPRuntime Size (Gentoo Linux x86)~1.4Mb (/usr/lib/libpython3.1.so)~3.2Mb (/usr/lib/libv8.so)~7Mb (/usr/bin/php)Type SystemStrong TypingWeak TypingWeak TypingVulnerabilities867324501Performance35.425.3562.45OptimizationPsyco (up to 100x)V8 JavaScript engine is already optimizedPHP AcceleratorsDocumentationExcellentAveragePoorC BindingsExcellentAveragePoorCode ReadabilityWith PEP8 it can be perfectEven with Google JavaScript Style Guide it can be a messPEAR Coding Standards can't help itDebuggingExcellentAveragePoorMy totals: Python - FTW, JS - AVG, PHP - KMN :-)Additional notes (I didn't include them in the table due to its irrelevance in some cases):Python is supported on enormous amount of platform, PHP - on slightly less, V8 - only on Linux/Windows/MacOSX.So…