Prev: tcl ssh extension library?
Next: Expect spawn expect
From: John Seal on 17 Nov 2009 09:36 "Donal K. Fellows" <donal.k.fellows(a)manchester.ac.uk> wrote in message news:7336ab64-cf31-483e-b638-7cec9c67f84e(a)l2g2000yqd.googlegroups.com... > what we've got > is not really a type hierarchy at all, but something else. (A > responsibility hierarchy perhaps?) Hear! Just within the last few days I was telling our Chief Engineer that Tcl tends to minimize syntax and reserved words and complex types in favor of personal responsibility. You can do almost anything, just take responsibility for what you do.
From: Frédéric Bonnet on 17 Nov 2009 10:09 Donal K. Fellows wrote: > If all your 3-year-old has is a hammer, watch out for the furniture. QOTW?
From: Neil Madden on 19 Nov 2009 07:04 Donal K. Fellows wrote: > On 15 Nov, 01:46, "tom.rmadilo" <tom.rmad...(a)gmail.com> wrote: >> Looks like a cool language, from the hype, but one thing stuck out >> which seems very promising: >> >> * Go's type system has no hierarchy, so no time is spent defining the >> relationships between types. Also, although Go has static types the >> language attempts to make types feel lighter weight than in typical OO >> languages. > > That's essentially duck typing. In a compiled language, that's unusual > (and is in fact something that's brought in from scripting languages > if I've understood the FAQ right). This is something to watch to see > how well it works in practice. It's structural subtyping a la Ocaml, AFAICT. There are arguments pro/con structural vs nominal typing, but generally I much prefer this approach. It will be interesting to see if Go catches on, and whether it does so as a general purpose language, or perhaps in a niche such as Android programming. -- Neil
From: Larry W. Virden on 19 Nov 2009 07:33 On Nov 19, 7:04 am, Neil Madden <n...(a)cs.nott.ac.uk> wrote: > > It will be interesting to see if Go catches on, and whether it does so > as a general purpose language, or perhaps in a niche such as Android > programming. One of the recent articles mentioned the fact that the Android platform either is currently, or expected to be by the end of year (I don't remember the exact quote) the largest Linux platform in existence. I hadn't really thought of that before the article.
From: Neil Madden on 19 Nov 2009 07:27
tom.rmadilo wrote: > On Nov 16, 6:49 am, "Donal K. Fellows" > <donal.k.fell...(a)manchester.ac.uk> wrote: >> On 16 Nov, 14:13, Alexandre Ferrieux <alexandre.ferri...(a)gmail.com> >> wrote: >> >>> I was just arguing it would be cool to be able to extend a type >>> instead of duplicating. >> Extending? Adding new operations? >> > > I have an essentially organic distaste for type extensions so it is > somewhat difficult for me to explain via rational argument. > > My first issue is that you need to support additional language > features to create a type extension, so you get automatic language > bloat and measurable technical complication. > > As a consequence of this first issue, there are two modes of > programming: direct programming and programming by diff/patch. To > understand the problem of programming by diff/patch, imagine if you > had to update source code by typing in the diff of the original code > and what you want the new code to look like. This is what programming > via diff/patch is like. You are confusing subtyping and inheritance. Subtyping means simply creating a new type that permits at least the same set of operations as the base type. It says nothing about how these are implemented. Inheritance is then a specific mechanism for reusing code to implement subtyping, which corresponds to your notion of programming by diff/patch, but is not the only approach by a long way. [...] > > My second issue is that I don't think the real world supports type > hierarchies. They are a logical construct which "does not model" the > real world. Unlike most models, type hierarchies add complications to > the model which do not exist in the real world. Usually models > simplify reality, but this is not the case with type hierarchies. Are you advocating a form of Platonic realism, in which there is some objective "real world" out there which corresponds directly to some natural approach to modelling? Personally, I believe that the intended interpretation and application has quite an impact on what models make sense (cf. the definition of "model" in logical semantics). As a case in point, do you believe there is a relationship between the concepts of "chair" and "furniture"? If you were coming up with a model of "objects in my house", then you'd almost certainly say "yes, there is a kind-of (subtype) relationship between them". If you were instead modelling the morphology of words in the English language, then you may instead prefer not to model such a relationship, but instead to model "chairs" and "chair" as related to the lexeme "CHAIR". [...] -- Neil |