3 ms·
PHP? C?
by stcredzero 7y ago
PHP? C?
- robbrit 7y agoAlways remember to turn on warnings in PHP. I remember the joys of tracking down a mistyped variable name that PHP just instantiated and gave a null value to, which was then implicitly converted to empty string when the variable was used.
- JamesBarney 7y agoLast time I worked with those languages was in college 10 years ago so I didn't know portion of shooting myself in the foot was my fault versus the language.
- besulzbach 7y agoI agree that JS is not substantially "worse" than some other languages. Despite these three languages giving far too much freedom to the programmers (which some might even like), high-quality code can be written in all three of them, as long as intelligent and strict coding guidelines are thoroughly followed.
- JamesBarney 7y agoI always think of languages as a solution space, and some points in the space possessing bugs while others don't. A perfect language(impossible) would make it so you could write any correct version of a program in the language but not any incorrect version. And language constraints like static typing have the disadvantage that you're preventing a bunch of correct possible solutions while closing off incorrect solutions. Ideally closing off many more incorrect solutions than correct ones increasing your chance of landing in a correction solution. And of course lots of out of band(non-language) processes and tools that influence this like unit testing/code reviews/strict coding guidelines. But it's always nicer when it's prevented at the language level as opposed to out of band.