Hacker News new | ask | show | jobs
by ttkciar 2434 days ago
D comes with a lot of "casual parallelism" baked in at the language level, and in its standard libraries. Actors are just one feature among many.

You -can- explicitly manage threads and processes like in other languages, but much of the time there is a more lightweight, expressive construct available.

For instance, you can turn this loop: foreach(ref i; arr) i = i * i;

Into a parallelized loop by simply: foreach(ref i; parallel(arr)) i = i * i;

Example was shamelessly lifted from: https://tour.dlang.org/tour/en/multithreading/std-parallelis...

1 comments

Much like immutability, I don’t generally find it compelling when a language offers such a critical feature as just one among many. I prefer my languages to be opinionated.

I’m curious how the actor model works on a large system with lots of 3rd party libraries (or even different development teams) when you can’t guarantee that everyone is using it.