3 ms·
Interesting to think about the sorts of cultural markers that other languages have. Maybe this is just another way of saying 'code smell', but there must be sim
by kanatohodets 13y ago
Interesting to think about the sorts of cultural markers that other languages have. Maybe this is just another way of saying 'code smell', but there must be similar elements for JS/Ruby/Python (for example) where it the code isn't strictly 'wrong' (or even debatably wrong), but is still clearly indicative of a particular cultural approach towards coding in that language.
Like overriding Array.prototype.push in JS - it might be just fine, but I tend to pause and re-evaluate my attitude towards the code when I see that going on, because it's a very different approach to coding in JS than I personally use.
- mattmanser 13y agoI tend to see much clearer indicators in JavaScript code. Global variables? Lots of functions outside any closure? Old skool js coder ahead. You can also tell javascript only programmers a mile off. Anonymous functions everywhere? Functions have multiple concerns? Use 'var aFunction = function()'? Mono linguist and spaghetti code ahead.
- baudehlo 13y agoA lot more JS coders could benefit from adding "use strict" to their code too. It's frankly amazing it isn't used more.
- losethos 13y agoMy compiler is better than C/C++. If you do not have arguments, you do not need parenthesis on function calls. You are a nigger. I wrote a compiler. If you were not a nigger, I might have thought you found my "PAREN_WARN" compiler option. I have different precedence rules for my language, so to keep everybody on their toes, I give a warning if you have extra parens.
- philwelch 13y agoIn Ruby, using explicit "returns" or ternary operators can be a hint that someone is newer to Ruby. On the other hand, using symbol-to-proc syntax indicates some experience (I.e. list_of_objects.map(&:method))