bastion icon indicating copy to clipboard operation
bastion copied to clipboard

Bikeshed the api traits / structs and function names

Open o0Ignition0o opened this issue 4 years ago • 3 comments

Since we're focused on polishing the APIs at the moment, it's a great time to try to find names for our APIs that fit.

The main names we could bikeshed can be Children / Child | Supervisor | Distributor | MessageHandler

Given the project name uses wording that can be found in a military / defense context, refering to Children as Platoon (or maybe a Squad / Crew ?) was suggested. A child could be a Trooper or so?

Any thoughts ? :)

o0Ignition0o avatar Apr 07 '21 08:04 o0Ignition0o

At the time when this project first established, I wanted to use process pid for addressing async closures. Then onwards, I see that people wants to address content and it evolved to Akka's children model https://doc.akka.io/japi/akka/current/akka/actor/dungeon/Children.html

Then we can address multiple actors with asterisk under the same group like "supervisor::*" will give all the async closures run with lightprocs (which we call processes) to be addressable all at once. This doesn't exist in Erlang obviously but that's where we diverge to create a better usage. So then children was born into it's current form.

vertexclique avatar Apr 07 '21 09:04 vertexclique

Where possible, I would avoid using a plural for a struct name, e.g. Children. It creates mental friction for people learning the API because it leads to sentences that are grammatically incorrect, e.g. "a Children" and "two Children's"

timClicks avatar Apr 09 '21 06:04 timClicks

I saw that too, we can get rid of that construct and leave redundancy to users directly in condition-controlled loops. I also don't like it in the current form, I agree.

vertexclique avatar Apr 09 '21 09:04 vertexclique