[Grace-core] Layout rules for Grace

Andrew P. Black black at cs.pdx.edu
Thu Feb 2 10:02:53 PST 2012


On 1 Feb 2012, at 16:26 , James Noble wrote:

>> Gee, I like speed: aNumber.
> 
> :-)
> 
> which. following Scala, is probably where we end up.
> 
> http://docs.scala-lang.org/style
> 
>> Do we really need to set layout rules at this level of detail?  Why don't we just worry about indenting and not spacing or we'll drive everyone crazy.
> 
> We will, eventually, but not necessarily now. 
> Once we get to building a formatter, then that would be the spec of the formatter..
> 

No, we don't.  But if we build a pretty-printer that generates text from an AST, then decisions will have ti be made.

My preference for the rule about : comes from wanting to see identifier:type as a single element in a parameter list, rather than seeing it as three elements.  In other words, that the type as annotations on the identifiers, rather than stand-alone elements.   So, if one's goal is to parse parameter lists differently, I can see that one might make different choices.

	Andrew





More information about the Grace-core mailing list