Alex Rivera | Logout

Preferred way of grouping utility functions in Scala?

Asked 2011-04-23T11:00:28.100
13

What's the best way of grouping utility functions that don't belong in a class? In Ruby, I would have grouped them in a module. Should I use traits in Scala for the same effect, or objects?

Edit
Report

1 Answer

2

Traits if you want them to be mixed in with the classes that are going to use it. Objects if you want to only have to import them.

answered 2011-04-23T11:25:34.113

Your Answer