3 ms·
I personally welcome those kind of ports and hate blind insistent on "idiomatic" code. Idiomatic Java, Perl and other languages were shit for a long time, they
by coldtea 11y ago
I personally welcome those kind of ports and hate blind insistent on "idiomatic" code.
Idiomatic Java, Perl and other languages were shit for a long time, they only improved when some brave soulds fed up with it and explorer non-idiomatic solutions (like the Play framework). And some things I see in "idiomatic" Go make my hair crawl...
- ORioN63 11y agoI'm going to disagree with you there. Idiomatic code is so called, because people familiar with the language can quickly read it. It makes reading code a much lighter task. Frameworks are a different thing. Frameworks build around its host language, but normally are meant to use in a specific way. In its own idiomatic way.
- coldtea 11y ago>Idiomatic code is so called, because people familiar with the language can quickly read it. It makes reading code a much lighter task. In the case of Java circa 2000-2006 it needlessly messed up code, making it more difficult and slow to read EVEN for people familiar with the language. Following conventions doesn't make code better to read automatically just because people are already familiar with them -- those conventions should be good in the first place for that to happen. Node has the callback hell "idiom" many are familiar with. And yet if somebody rewrote the code with async, await, even the people "familiar" with callbacks would be able to read it faster and understand it better.
- mattkrea 11y agoI don't think this is universal as it hasn't applied where I work. Without understanding how promises work they are no easier and it doesn't help that many things exists that do not use the standard .then() and .catch().
- coldtea 11y agoAsync/await is not the same as bare promises though with then() and catch.
- 0xdeadbeefbabe 11y agoWhat did your hair do when you saw idiomatic perl?
- coldtea 11y agoIt stood up and whispered to my ear to move to Python, which I did, circa 1997.
- hahainternet 11y agoWhen you realised that Python had extremely similar problems to Perl but hadn't even managed things like Unicode support in 2015, what did you do?
- bliti 11y agoAlso consider that idioms evolve over time. Java from the 90s (or C++) reads different.
- coldtea 11y agoThat's my point. They reason they evolve is that people don't blindly stick to the idioms and try other approaches which then stick on.