SRP port to slate
Brian Rice
water at tunes.org
Thu Jan 20 03:07:14 PST 2005
Comments as I'm going:
- "n upTo: m - 1 do:" -> "n below: m do:"
- and:,or: -> /\,\/
- isNil ifTrue:ifFalse: -> ifNil:ifNotNil:
- `>> works on any message sends, not just assignments, and returns the
left argument by default as the last block expression after a period.
Explicit ^ returns in single-expression methods or on the last
statement of any method are redundant.
- "aFoo" named arguments are not helpful, and in fact misguide the user
into predicting what values and types will come through. Only
dispatches and type declarations or inferences are worth anything. (Or
contracts if someone wants to add them.)
- Explicitly naming collection types like Set throughout the code leads
to brittleness. Just set up a Set newEmpty in a relevant prototype's
slot and use that as the prototype for new values of related usage
(especially for those stored into the same slot).
- The precedence system of unary/binary/keyword is very simple and
should be used to minimize the number of parentheses used.
- Don't trust the emacs indenter to get things right even half the
time. Ignore it mostly.
You should have picked something smaller to chew on first, as fixing
all of these requires a decent amount of tedious work or emacs-fu to
complete. :)
On Jan 20, 2005, at 2:06 AM, Brian Rice wrote:
> Very cool! I'll take a look at it now and incorporate into CVS for the
> record once I've made a preliminary pass over it.
>
> On Jan 19, 2005, at 7:27 AM, John Leuner wrote:
>
>> Attached is a preliminary port of SRP to Slate.
>>
>> It is not generally usable yet but can read and write some basic types
>> (Integers, Characters, Strings, Arrays) and has basic support for the
>> mapping mechanism and mapping rules.
>>
>> I intend to make it a bit more polished in the coming weeks.
>>
>> Feel to free to look through and criticise my slate code (the original
>> aim of the port was to learn more about slate and smalltalk).
--
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/
More information about the Slate
mailing list