Code formatting patterns (was: [squeak-dev] The Trunk: Compiler-cmm.275.mcz)

Bert Freudenberg bert at freudenbergs.de
Fri Oct 4 16:42:56 UTC 2013


On 2013-10-04, at 18:31, tim Rowledge <tim at rowledge.org> wrote:

> 
> On 04-10-2013, at 9:23 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
>> 
>> 
>> That said, I could live with your version below, in particular if it was automatically produced. It just doesn't feel as nice as the hand-formatted one which even takes into account the semantics of keywords to find suitable breaks.
> 
> 
> We need a pragma to describe how a method's name is formatted by automagic formatters.
> copyTo: resultBuf from: start to: stop) from: buf startingAt: firstInBuf normalize: nFactor dcOffset: offset
> <pragma format: (3 5 7)>
> 	self wibble: buf….
> 
> The pragma says keep the first 3 keyword fragments together, then the next 2 and then the last 2, all as advisory input


Well, or just use line breaks in the method pattern.

- Bert -



More information about the Squeak-dev mailing list