scala-hamsters / hamsters

A mini Scala utility library
Apache License 2.0
291 stars 23 forks source link

Plural form for result vs failures : rename to Validation.run #42

Closed dgouyette closed 6 years ago

dgouyette commented 6 years ago

Validation.result vs Validation.failures. Use plural form for both

Edit : use rename Validation.result to Validation.run (see comments)

loicdescotte commented 6 years ago

Now I remember why it's called 'result' and not 'results'. It does not necessarily give the results of all operations. It give the result of the validation, i.e. the right values or a list of failures. Example : https://github.com/scala-hamsters/hamsters/blob/master/shared/src/test/scala/ValidationSpec.scala#L38

Maybe a better name would have been Validation.run ...

In the same time, failures always give a list of failures, that can be empty