Here are 4 itcl scripts that enlight the question "is it recommended to have separate spec and body source files ?" :
The idea behind this is to have a stable spec file and some many moving body implementations.
The specification of class :
class MySimpleObject { public variable name constructor { {aName "unknown"} } { set name $aName return $this } method name {} }
A first version of the body :
body MySimpleObject::name {} { return $name }
A second version of the body :
body MySimpleObject::name {} { return "My name is $name" }
The main one which shows a change in implementation of the same spec :
package require Itcl; namespace eval itcl { source "MySimpleObject-spec.itcl" source "MySimpleObject-body-1.0.itcl" MySimpleObject my puts [my name] my configure -name "Laurent" puts [my name] source "MySimpleObject-body-1.1.itcl" puts [my name] }