3 ms·
Given that Go does not have the same syntax, you cannot claim that these are examples of "typical Rob Pike design".
by Jabbles 4y ago
Given that Go does not have the same syntax, you cannot claim that these are examples of "typical Rob Pike design".
- masklinn 4y agoGP's not talking about this specific syntax but about Rob Pike's general approach to language and system design. A flagrant example of > idiosyncratic, not that user friendly, and mostly "works for me" affair being date/time patterns in Go.
- Jabbles 4y agoYou can't just cherrypick examples and say this is typical. Even worse, you (GP) can't say this is typical without providing any examples when the most obviously relevant analogy (precendence in Go) does not support your statement.
- eis 4y agoYou are misunderstanding his point even though masklinn explained it. It's not about the specific point of operator precedence. It is about designing something that has internally sound logic but is very unexpected by a typical new user. And he provided the example of time package patterns in Go which imho fits very well. Yea it makes sense but I'm sure there are hordes of users that think "why doesn't this work like in virtually every other language?". It's probably good to not take the "typical" too literally and more as a "Rob Pike has done a few designs in the past that have this quality".
- mseepgood 4y ago> "why doesn't this work like in virtually every other language? What's the point in creating something new if you simply repeat what already exists?
- coldtea 4y agoDoing it better in other aspects (e.g. 100% same design but faster or safer, etc.)? Refactoring? Making a FOSS version? Learning? Doing it in Rust because it's fashionable? Competition with an existing player in the same market? And lots of other reasons besides...
- indymike 4y agoThe op was commenting Rob Pike's body of work and Ivy's operator precedence certainly does fit this description to a tee.
- coldtea 4y agoIt's not about the particular intepreter or specific precedence design, it's about the tendecies described: what kind of stuff he often appears to like and/or produce. Now, you might disagree with that, but at least disagree with what I tried to say, not what I didn't mean :)
- ducktective 4y agoAre the `-option` thing in Go CLI apps and method capitalization (`myobject.GetStuff()`) other examples of these idiosyncraticies?
- coldtea 4y agoThe -option I'd say yes. Although this is vintage UNIX style behavior, in 2009, when Golang emerged, it should have picked GNU-style. No reason except idiosyncrasy or nostalgia to go with single dash. For method capitalization, I'd say no, as this is the case in any other popular languages too (C# to name but one).
- masklinn 4y agoThe capitalisation itself isn’t idiosyncratic (though it seems uncommon in the unix world), however that having a semantic impact is rather rare. Not completely unique (e.g. variables v symbols in erlang, concrete type v generic placeholder in haskell) but really rare, and usually the capitalisation isn’t a switchable thing, it’s a very fixed meaning.
- jasonwatkinspdx 4y agoExcept that comment is just straight up wrong. This approach to precedence comes straight from Iverson and APL itself. Iverson originally started out designing a more uniform mathematical notation. It developed into a programming language secondary to that. Note that J, K, and others in this family all duplicate this choice largely. And there's mainstream languages that have chosen the middle ground of allowing basic precedence for + - * / expressions but require explicit grouping otherwise. It's not a particularly outlandish idea. So attributing it to Rob Pike's personality traits is just off the mark. It's ok to be critical but it should be specific and informed, not just bashing someone character as a whole, and if you're gonna take it that far, you'd probably better at least know what you're actually talking about. And note I've been critical of Rob's choices and behavior surrounding Go's date/time on a particular issue, so note this isn't empty hero worship on my part.
- coldtea 4y ago>So attributing it to Rob Pike's personality traits is just off the mark That's fine, since I didn't speak about Pike's "personality traits", but to his architecure/design tendencies. And I didn't attribute this design to him. I know of APL, and even if I didn't the influence is right there in the TFA title. I compared it to his designs ("sounds like a typical Rob Pike design"), i.e. he adopted it because he does have these design tendencies, and so this was to his taste. >not just bashing someone character as a whole Where exactly are you getting that from? As if I've called him a "bad person" or something?