Hello world!

Type theory is one of the more interesting things in the theory of programming languages. There will be more posts about it in future, but for now, as an introduction (and also to explain the title of this blog) just a few words about what is called “Duck Typing”.

The saying goes (I don’t remember who said this)- “If I see a bird which walks like a duck, swims like a duck and quacks like a duck, then I call that bird a duck.” (There are many variations of this). The essence of this statement is that, the class to which an object belongs can be seen to be defined only by its properties, rather than associating any intrinsic class to the object itself.

In programming languages, this has an interesting application. It is specifically meant for dynamically typed languages (that is, the “type” of the variable is decided at run-time) but it goes one step ahead. It looks at a variable, any variable, only when it is being used, and then checks whether the method call is valid for a variable of this type and works accordingly.

So it is with this blog- what this blog will be about shall only be decided in due time depending on what I write in it. But I shall be posting occasionally, again I don’t know about what, but this will probably be a collection of notes, interesting trivia, etc., mostly about technical or mathematical stuff, that I compile. Since this is mostly I would have liked to keep this blog private, but then I realised that any mistake I make (and there will be plenty of them) shall go unnoticed if people did not point them out in comments (thankfully, there are a lot of helpful/self-righteous/obsessively compulsive netizens out there who cannot refrain from correcting something wrong they see on the internet), So I changed the privacy to public.

So do comment if I happen to post something outrageously wrong. Any criticism will only be appreciated.

Advertisements