Comments (4)
Yes, the valid macros from which stop_server/1
can be used are documented here.
I guess for the sake of completion we could add macros for :ignore
and {:stop, reason :: any}
. The problem is that stop for defstart
(which is init/1
) would have to be differently named, so I wonder if it's worth it, because you can just return {:stop, reason}
. The main motivation behind the existing responder macros was to have pipe friendly interface, so you can just pipe the state into the callback return value. IMO, that advantage is less relevant with the {:stop, reason}
and :ignore
tuples, so I currently have some reservations about adding the support for them.
from exactor.
Yes, good idea. I’ll think a bit about this, and then either document the intent better, or add the macros you requested. Thanks for pointing this out!
On 31 Mar 2016, at 01:11, OvermindDL1 [email protected] wrote:
True, I just like consistency in how functions visually flow, and some control functions ending in tuples and some ending in functions is just a touch jarring, but I am currently using {:stop, reason} right now. The piping is good reasoning for them, perhaps document that that is their purpose to help dissuade this?
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub #17 (comment)
from exactor.
For note, the tuple in init for :stop is: {:stop, reason}
Thus no state is needed.
from exactor.
True, I just like consistency in how functions visually flow, and some control functions ending in tuples and some ending in functions is just a touch jarring, but I am currently using {:stop, reason} right now. The piping is good reasoning for them, perhaps document that that is their purpose to help dissuade this?
from exactor.
Related Issues (19)
- function undefined error at elixir v0.11.0 HOT 2
- Can't build docs for project what uses exactor HOT 1
- Any roadmap to supervise the started actor? HOT 5
- DSL for :local, :global name registration from supervisor's spec HOT 3
- Pass timeout parameter HOT 3
- how does it differ from elixir agent HOT 7
- Elixir > 1.2 throws compile-time warnings for unused variables HOT 3
- defcall can not use in quote HOT 3
- Struct pattern matching error HOT 3
- `export:` only accept atom.
- Testing support HOT 11
- Can this be used with a via_tuple? HOT 4
- Possibility of custom process registration dispatching logic? HOT 7
- Support for Elixir 1.5 @impl HOT 4
- Generate typespecs as well HOT 1
- Broken link in README
- Unused variable warnings when variables created in map pattern match HOT 1
- Why was ExActor not a good idea? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exactor.