« Return to Thread: Another formatting question: function types

Re: Another formatting question: function types

by Daniel Sobral :: Rate this Message:

Reply to Author | View in Thread

Spaces and parens too. It might get weird if the result is a tuple of the same arity as the function, but...

On Wed, Jun 10, 2009 at 3: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



--
Daniel C. Sobral

Something I learned in academia: there are three kinds of academic reviews: review by name, review by reference and review by value.

 « Return to Thread: Another formatting question: function types