Replies: 6 comments 3 replies
-
Also, as I mentioned for discord, |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
A scope isn’t a link. |
Beta Was this translation helpful? Give feedback.
-
My suggestion is to retain Scope and introduce ComponentRef |
Beta Was this translation helpful? Give feedback.
-
I realise this but didn’t realise that self() wouldn’t be permitted. Perhaps own() then or something else. I was also trying to point out what other libraries call it. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the discussion and the outside perspective using Akka 🎉 Always awesome to see different sides to things IMO ❤️ I do agree here that with I'm not in love with the names of either I have no issue with bringing back a type alias for
Maybe this is just me: let x: &Component = //.. When considering As a short aside..
I didn't know that 😅 |
Beta Was this translation helpful? Give feedback.
-
I'd like to propose that we (re-)introduce a new type to describe references to components and agents. Presently, these are named "links". Links are references to scopes in the case of components. My position is that reference should be an opaque type entirely for the purposes of addressing a component or agent. As it stands, we are leaking the notion of "scope" to the caller when we are strictly conveying an address of a component.
I see that Components V2 removed
ComponentLink
but I cannot find any rationale as to why. There was some questioning on the context'slink
method returning aScope
, but that is the only commentary I have found to-date. In addition, theAgentLink
has been retained, which now feels inconsistent in that there is no longer an equivalent for components.In actor libraries such as Akka, these references are known as ActorRefs.
The suggestion I have is to provide a type named,
ComponentRef
for components andAgentRef
for agents. As these types reference different types of things, I would think it is reasonable to have two types of addressing mechanisms (as we do/did). Over time, these types might also contain different internal representations to be able to address components and agents.EDIT: I removed a proposed solution of “self” and “ref” naming as its more important to focus in on the goal, which is to have a separate type to address components, and make that consistent with addressing agents.
Beta Was this translation helpful? Give feedback.
All reactions