dsimcha Wrote: > == Quote from Sean Kelly (s...@invisibleduck.org)'s article > > Álvaro Castro-Castilla Wrote: > > > > > > Language extensions for message passing, such as Kilim for Java send > > > messages > giving away the ownership of data, not copying it. That's a reason for the > need of > compiler/runtime support. > > Knowledge of unique ownership can obviate the need for copying, but copying > > is a > reasonable fall-back in most cases. > > > Also, parallel map/foreach is more feasible as a library-only solution, > whether the message passing requires some support from the runtime > environment. > > It really depends on the language and what your goals are. There are > > message > passing libraries for C, for example, but they don't provide much in the way > of > safety. > > IDK, generally I agree with the idea that D and Phobos should provide safe > defaults and more efficiency when you really need it and explicitly ask for > it. > The exception, though, is when someone is using a construct that would only be > used by people who really need efficiency, and thus has already explicitly > asked > for efficiency. This includes parallel foreach.
Yeah, that's why I said in my original reply that if message passing were used, it may be necessary to use casting to avoid copying. However, it may just be enough to just pass a slice of a shared range. Nothing has really been decided regarding restrictions for what can be passed.