re: What ever happened to putting the object type on the left? VIEW POST


I am not sure if this is a trend or not or why it is happening, but I do think I prefer the return type on the right.

When I write code in Scala, the method definitions look like:

def add(a: Int, b: Int): Int = a + b

So when you read from left to right you get the intuition that I am taking these parameters and turning them into the return type.

That being said I don't think the placement matters too much to me as long as I am not switching between the two styles too frequently.

Code of Conduct Report abuse