These are chat archives for atomix/atomix

23rd
Apr 2016
belowm
@belowm
Apr 23 2016 13:48 UTC
@jhalterman I'm not sure if a toArray method is a good idea. It would make it very tempting for an application developer to invoke such a method that looks tame but can be extremely expensive under the hood. Also, I don't really see the usecase for this, except when one would like to perform batch processing on the entire content of a collection. I think a better approach to this would be a callback-based iteration method, that allows to apply a procedure to each element present on the collection. like the java8 foreach method on the list, but with asynchronous semantics: https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html#forEach-java.util.function.Consumer-
belowm
@belowm
Apr 23 2016 15:46 UTC
A toArray method would not scale when the collection grows