4 ms·
When I saw that this was inspired by Erlang, I expected to see light-weight processes and built-in language constructs to support Actor style message passing be
by nathanwdavis 15y ago
When I saw that this was inspired by Erlang, I expected to see light-weight processes and built-in language constructs to support Actor style message passing between processes. I don't see that or anything else Erlang like.
- stcredzero 15y agoIs it on the roadmap?
- bakkdoor 15y agoYes.
- riffraff 15y agoapparently it's not documented but there is some code in the examples lib in github. It looks more like Io than erlang to me. https://github.com/bakkdoor/fancy/blob/master/examples/async_send.fy https://github.com/bakkdoor/fancy/blob/master/examples/async... https://github.com/bakkdoor/fancy/blob/master/examples/future.fy https://github.com/bakkdoor/fancy/blob/master/examples/futur... https://github.com/bakkdoor/fancy/blob/master/examples/future_composition.fy https://github.com/bakkdoor/fancy/blob/master/examples/futur...
- nathanwdavis 15y agoSo, it looks like @@ is how you send a message to an actor. But there are still a lot of questions I have about what the implementation of that actor is: a lightweight process, a unit of computation to be scheduled, or is it essentially the same as calling any other function? It will be interesting to see how Fancy evolves its Actor features in comparison to other languages with built-in Actors.
- bakkdoor 15y agoThe current implementation of futures uses a thread pool. I'm planning on changing this a bit to behave more like Io's actor model.
- jamii 15y agoI'm pretty tired of languages that claim 'erlang-style' concurrency without any of the erlang features that actually make it useful (process isolation, link/monitor, supervisors etc). EDIT: Personally, I would also add to the above list: algebraic data types, optional static typing with a (mostly) sane type system, no inheritance / minimal indirection, immutable by default, (reasonably) good introspection, support for live code replacement.
- nathanwdavis 15y agoYes, thank you for reminding me how awesome Erlang is!
- bakkdoor 15y agoHi, I'm the author of Fancy. The erlang-style actor message passing hasn't been implemented yet. I'm workin on that though. Rubinius has a built-in Channel type, (similar to go) and an Actor library built on top of it. Once I get some of the other language features I'm currently working on done, I'll focus on that part of the language. It just takes some time to get all these things finished, but it was always a goal to have this in the language. Rubinius also has inter-vm communication which I will expose in Fancy as part of the language as well. Another feature I'm currently working on is first-class pattern matching that preserves encapsulation (basically you have patterns as first-class values and matching an object against a pattern involves asking the object if it matches a given pattern - that way you don't break encapsulation). Hope that explains some of your concerns.