[ANN] Towards a new File In / File Out format

Noury Bouraqadi bouraqadi at ensm-douai.fr
Mon May 29 10:11:56 UTC 2006


Dear Squeakers,

When writing papers with Smalltalk code, or even sometimes when 
programming, I noticed that we need some way to express method 
definitions in a simple text file while still showing the class where 
they are defined. The current (legacy) file in/out format proves 
inappropriate. I wanted to get ride of exclamation mark and ease 
linking methods to classes. So, I started thinking of something else, 
and started a new project on this topic on SqueakSource:

http://www.squeaksource.com/NewFileInOutFormat.html

My target is to have .st files as a squence of any valid Smalltalk 
expression and to provide a simple protocol for defining methods. For 
now,  method definitions are possible using, two messages.

-The first one is short and allows adding a method to a class without 
taking care of the category (the method appears in the browser 'as yet 
unclassified'). Example :
MyClass << #(myMethod "Body of myMethod" )

-The second message to add a method under some particular category. 
Example :
MyClass inCategory: #someCategory addMethod: #(myMethod "Body of 
myMethod" )


For comparison, here is the same example in the file In/Out format 
currently used in Squeak
!MyClass methodsFor: 'someCategory' stamp: 'nbo 5/23/2006 12:08'!
myMethod
	 "Body of myMethod"! !

Note that the current version is still uncomplete. It does lose 
comments, author info, timestamps, and formatting (though the installed 
code is formatted using the pretty printer).

Noury
--------------------------------------------------------------
Dr. Noury Bouraqadi - Enseignant/Chercheur
Ecole des Mines de Douai - Dept. G.I.P
http://csl.ensm-douai.fr/noury

European Smalltalk Users Group Board
http://www.esug.org

Squeak: an Open Source Smalltalk
http://www.squeak.org
--------------------------------------------------------------





More information about the Squeak-dev mailing list