News for hackers. Stuff that matters.
Re:A Go “clone” of the great and famous Requests library by coldtea on Friday June 26, 2015 @10:51AM (#9784782)
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...

Re:A Go “clone” of the great and famous Requests library by ORioN63 on Friday June 26, 2015 @11:29AM (#9785171)
I'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.

Re:A Go “clone” of the great and famous Requests library by coldtea on Friday June 26, 2015 @01:04PM (#9786105)
>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.

Re:A Go “clone” of the great and famous Requests library by mattkrea on Friday June 26, 2015 @07:19PM (#9788301)
I 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().
Re:A Go “clone” of the great and famous Requests library by coldtea on Friday June 26, 2015 @08:56PM (#9788607)
Async/await is not the same as bare promises though with then() and catch.
Re:A Go “clone” of the great and famous Requests library by bliti on Friday June 26, 2015 @03:12PM (#9787059)
Also consider that idioms evolve over time. Java from the 90s (or C++) reads different.
Re:A Go “clone” of the great and famous Requests library by coldtea on Friday June 26, 2015 @08:57PM (#9788610)
That'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.
Re:A Go “clone” of the great and famous Requests library by 0xdeadbeefbabe on Friday June 26, 2015 @11:33AM (#9785209)
What did your hair do when you saw idiomatic perl?
Re:A Go “clone” of the great and famous Requests library by coldtea on Friday June 26, 2015 @01:05PM (#9786117)
It stood up and whispered to my ear to move to Python, which I did, circa 1997.
Re:A Go “clone” of the great and famous Requests library by hahainternet on Saturday June 27, 2015 @06:08AM (#9789692)
When 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?