On Wednesday 11 March 2009 18:18:59 Raoul Duke wrote: > > Another red herring: you are describing a disadvantage of nominal over > > structural typing. Not dynamic vs static typing. > > there are probably several different arguments being conflated in such > discussions. > > for example, theory vs. practice: there is the theory of what in fact > are the options for typing, and then there is the practice of what > programming languages currently exist, and what of all those options > do they implement. so if there is not a popular "statically typed" > language which does "duck typing", and most people are only aware of > "statically typed" languages that don't, then that practice can easily > lead one to be confused into saying the theory of statically typed > languages don't work because they don't support "duck typing". or > statements made can be mistakenly inferred to be talking about the > theory when they are really talking about the practice.
Exactly, yes. > in other words, what "statically typed" language do proponents of such > languages hold up as the one which would most likely be the least > despicable in the eyes of dyed-in-the-wool "dynamic" language folks? The least despicable would probably be F# because you can resort to dynamic typing so easily: just box everything and use run-time type tests. That is not possible in OCaml and Haskell but they have more advanced static type system features (e.g. structurally-typed objects and polymorphic variants in OCaml) that are used to solve the same problems. The obvious bad examples are Java and C++ and I don't think it is a coincidence that most of these "red herring" examples seem to be drawn from problems specific to those two languages. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---