« Return to Thread: Another formatting question: function types

Re: Another formatting question: function types

by nuttycom :: Rate this Message:

Reply to Author | View in Thread

1: With the spaces
2: Either is legible, without the spaces is cleaner.

On Wed, Jun 10, 2009 at 12:56 PM, Bill Venners<bill@...> wrote:

> Hi All,
>
> I wanted to take the community's temperature on how they prefer to see
> function types formatted. I have three questions.
>
> 1. Do you want spaces around the => or not? Here is with spaces:
>
> (String, Int) => Unit
>
> Here is without:
>
> (String, Int)=>Unit
>
> 2. If a type has arity 1, do you want parens around it or not? Here it
> is with parens:
>
> (String) => Unit
>
> Here it is without:
>
> String => Unit
>
> 3. Lastly, anything else you like to see?
>
> Thanks.
>
> Bill
> ----
> Bill Venners
> Artima, Inc.
> http://www.artima.com
>

 « Return to Thread: Another formatting question: function types