What Scala type to use for a list of meeting participants
I want to store a number of participants for a meeting. The order of them is not important. The only thing I want to make sure is, that I will be able to add and remove participants, use filter functions (and alike) and get their number. Also duplicates are not allowed.
I started using List
for the method signature, but now I wonder if I should accept a more abstract type. I saw types like Traversable
, TraversableLike
, Iterable
and IterableLike
.
What Scala type to use for a list of meeting participants
I want to store a number of participants for a meeting. The order of them is not important. The only thing I want to make sure is, that I will be able to add and remove participants, use filter functions (and alike) and get their number. Also duplicates are not allowed.
I started using List
for the method signature, but now I wonder if I should accept a more abstract type. I saw types like Traversable
, TraversableLike
, Iterable
and IterableLike
.
What Scala type to use for a list of meeting participants
I want to store a number of participants for a meeting. The order of them is not important. The only thing I want to make sure is, that I will be able to add and remove participants, use filter functions (and alike) and get their number. Also duplicates are not allowed.
I started using List
for the method signature, but now I wonder if I should accept a more abstract type. I saw types like Traversable
, TraversableLike
, Iterable
and IterableLike
.
Concurrent collections, should read methods allow multiple threads at one time?
I have custom collection and I want to add wrapper to allow concurrent access.
Concurrent collections, should read methods allow multiple threads at one time?
I have custom collection and I want to add wrapper to allow concurrent access.
Is it a sane thing to return Streams wherever we would normally return Collections?
While developing my API that is not tied to any legacy code, I often find myself writing methods that are purely Streams pipeline terminated by collecting the results. Like this one:
Is it a sane thing to return Streams wherever we would normally return Collections?
While developing my API that is not tied to any legacy code, I often find myself writing methods that are purely Streams pipeline terminated by collecting the results. Like this one:
Why python function programming functions are not collection methods? [duplicate]
This question already has answers here: Are there any actual drawbacks to self-referential method chaining? (4 answers) Closed 9 years ago. In other words, is there a Python design related reason for it to be so? Functions like map, filter, reduce etc. are just plain functions. Is it just a poor design choice (if it […]
Why python function programming functions are not collection methods? [duplicate]
This question already has answers here: Are there any actual drawbacks to self-referential method chaining? (4 answers) Closed 9 years ago. In other words, is there a Python design related reason for it to be so? Functions like map, filter, reduce etc. are just plain functions. Is it just a poor design choice (if it […]
Injecting collections as constructor dependencies
We are using constructor dependency injection in our application. Following that approach we inject everything using an injection container so we are able to replace any dependency with a Mock.