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

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

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

Noury Bouraqadi
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:


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'!
         "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).

Dr. Noury Bouraqadi - Enseignant/Chercheur
Ecole des Mines de Douai - Dept. G.I.P

European Smalltalk Users Group Board

Squeak: an Open Source Smalltalk

Announcements and News from the Squeak Community
Squeak: http://squeak.org/
[hidden email]