published on 18.10.2007 09:37.

alle nach süddeutschland

zur abwechslung mal ein richtig guter beitrag im heise forum! und natürlich ist das kein troll :-)

Re: Warum drängeln die sich alle nach Süddeutschland?

»Weil in Bayern durch die Christlich Soziale Union eine verlässliche und kompetente Politik gemacht wird. Darüber hinaus sind hier die Menschen zufriedener, das Wetter ist schöner und die Berge sind höher. In Bayern sind gelebte Traditionen und HighTech eine Symbiose eingegangen. Hier versteht man zu leben und leben zu lassen. Wissenschaft, Technik, Kunst und Kultur sind im Freistaat zu Hause und liefern in einem inspirierenden Umfeld Höchstleistungen. «

no comments

published on 07.10.2007 14:02.

so what's duck typing?

duck typing is actually a simple concept. the best explanations i have come across (from wikipedia 1, 2):

»Suppose you see a bird walking around in a farm yard. This bird has no label that says ‘duck’. But the bird certainly looks like a duck. Also, he goes to the pond and you notice that he swims like a duck. Then he opens his beak and quacks like a duck. Well, by this time you have probably reached the conclusion that the bird is a duck, whether he’s wearing a label or not.” (Immerman 1982, p. 102)«

So, in programming, duck typing is a style of dynamic typing in which an object’s current set of methods and properties determines the valid semantics, rather than its inheritance from a particular class, or implementation of a formal interface.

The ruby mailing list has a great post called ”How to duck type? - the psychology of static typing in Ruby”, explaining the rationale and why duck typing is a good thing (in ruby). an excerpt:

»Many people coming to Ruby from a statically-typed language are somewhat afraid of Ruby’s dynamism, or “don’t get it(TM)”. David Black and I (edit: Tim Bates) believe that this is in part because it is thought that the uncertainty and changeability built into Ruby are dangerous and one wants to find shelter from them.«

Posted in ,  | Tags , ,  | no comments