From: panu Date: 2000-11-10T13:10:15+09:00 Subject: [ruby-talk:6240] Dynamic languages need formal typing of public interfaces Dynamic languages need formal typing of public interfaces Smalltalk's and other dynamic languages' (Perl, Python, JavaScript, Lisp, Ruby) strength is that they don't require you to declare the type of *every* variable used. Instead objects themselves know their type. This makes programming fun and productive and produces software that is easy to reuse. The weakness of dynamic languages is that they don't offer a standard way for declaring method signatures, which means there is no standard way of specifying the *contract* a class offers. And even if some of them offer support for adding type annotations to your code, none (I know of) *require* that you use these facilities where it matters the most: in the public interfaces. A proposal for a standard way to specify public signatures of Smalltalk classes - adaptable to other dynamic languages - has been made available at http://members.fcc.net/panu/SRNC-ST.htm. A new version 1.1. is now released, the single change being that public methods are allowed to return literal values (123, 'hello', etc.) without having to explicitly declare their types. The SRNC (Signature Revealing Naming Convention) proposal makes the following argument: We need a compromise between having to declare the type of *everything*, and not having to declare the type of *anything*. The rules of SRNC stipulate: "Formally declare the signatures of your public methods or else ... they aren't public!". Panu Viljamaa