Earlier quoted context omitted.
>It was a non sequitur, and a straw man It was neither, and repetition is not an argument. Let me paraphrase the conversation in the desperate hope you will at least read this since you refuse to read the thread you are discussing: Me: if you are seeing 2x slower, then that seems like unusual uses of python. Him: I think some real world uses of python are 90% C libraries and 10% python Me: I feel the cases you are re…
> Let me paraphrase the conversation in the desperate hope you will at least read this since you refuse to read the thread you are discussing > ... your continued insistence that your arrogant and pointless accusation was correct is absurd. If you don't wish to read something, don't reply to it. I'm attempting to keep the conversation civil (I have even gone back and changed some of my more inflammatory phrasings), a…
Google Go: The Good, the Bad, and the Meh
121–126 of 126 posts
Re: Google Go: The Good, the Bad, and the Meh
#122I'm sure there is probably some way to implement the same thing in Go using duck typing. Just wanted to point out the difference though.
Re: Google Go: The Good, the Bad, and the Meh
#123Earlier quoted context omitted.
The two major virtues of case-based visibility: 1. It creates a coherent syntax for making names visible that works both for member variables and package variables; you don't ever have to wonder how to expose something, because you always do it just by making the name uppercase. 2. It allows readers to see at a glance without thinking whether a value is public --- it's public if it's a proper name. In practice, Go st…
Please convince me this is a good idea. #1 does not seem to be a real issue. Most similar languages have the common, popularly understood, and easily-remembered keyword "public". Whereas capitalization is an exotic special rule that must be learned. If "you don't ever have to wonder how to expose something" is an important measure, I think Go is at a disadvantage here - especially if you want your code to be read by…
Second, if Go didn't use capitalization and wanted to keep package level visibility (which I will strongly argue is the Right Thing), there would be choice of having both private and public as keywords and requiring one of the pair to be put before before all constants, package level variables, type declarations, struct members, functions, and methods -- creating an immense amount of noise -- or to have one of the two and make the other one the default. Probably it would make more sense to have everything private by default and public only when prefixed with public… But it would be really ugly and inconsistent.
Now it might be possible to get around this with some other convention. Maybe it could be like Python, where everything is public by default but private if it starts with _. Or it could use a different, shorter keyword like 'p' so there's less noise overall…
But I think that once you make the decision to have package level visibility, case is the most efficient way of expressing it.
Re: Google Go: The Good, the Bad, and the Meh
#124Earlier quoted context omitted.
"quitting articles or conversations because of some remark" This is the problem with the internet and with political discourse in the 21st century: as soon as someone says something that seems off-kilter, even if it is technically correct, people stop listening/reading.
It's not correct. He's making an allusion to lisp and imputing to it the notion that everything is a linked list, which is not true. The article is a comparative discussion of programming languages. Earlier, it calls critics of the focal language in the article "idiots". That was OK with me while the author had credibility. It simply lost credibility for me at the point where it asserted that Lisp programmers don't u…
Re: Google Go: The Good, the Bad, and the Meh
#125Earlier quoted context omitted.
> Earlier, it calls critics of the focal language in the article "idiots". No, he only calls critics of SPECIFIC aspects of the language (aspects inconsequential and prone to bike-shedding) idiots. > It simply lost credibility for me at the point where it asserted that Lisp programmers don't use hash tables. You weren't supposed to read his article as coming from a Lisp expert, seeing that Lisp wasn't the main focus…
"You weren't supposed to read his article as coming from a Lisp expert, seeing that Lisp wasn't the main focus at all." Then why did he make snide, ignorant allusion to Lisp? "You shouldn't hold that comment against him; he doesn't know what he's talking about and you shouldn't expect him to" is an odd defense.
Re: Google Go: The Good, the Bad, and the Meh
#126Earlier quoted context omitted.
"You weren't supposed to read his article as coming from a Lisp expert, seeing that Lisp wasn't the main focus at all." Then why did he make snide, ignorant allusion to Lisp? "You shouldn't hold that comment against him; he doesn't know what he's talking about and you shouldn't expect him to" is an odd defense.
(Author here.) I find it odd that everyone thinks the remark is a criticism of Lisp. It's a criticism of Haskell. Lisp had a good excuse for focusing on linked lists back in the day. Then Clojure improved on it by promoting hashes to first class constructs. But Haskell is stuck in the past, at least as far as first class syntax goes.
data Tree a = Leaf a | Branch a (Tree a) (Tree a) deriving (Eq, Show)
I admit that the easiest way to construct a hashmap, using fromList [(key,value),(otherkey,othervalue)], isn't as pretty as Clojure's syntax.