Chain: a utility function for avoiding callback hell

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
airstruck
Party member
Posts: 650
Joined: Thu Jun 04, 2015 7:11 pm
Location: Not being time thief.

Re: Chain: a utility function for avoiding callback hell

Post by airstruck »

ejmr wrote:Continue can be implemented in terms of goto. But the reverse isn't possible.
Yeah, I think it makes sense given Lua's "small but powerful" design philosophy.
PIL Preface wrote: Lua is a simple and small language. It has few (but powerful) concepts. This simplicity makes Lua easy to learn and contributes for a small implementation.
I've written some documentation and automated tests for Chain; everything can be found here from now on. It was surprisingly hard to document for such a small amount of code. If anyone has suggestions for improving the docs, please let me know.
User avatar
ejmr
Party member
Posts: 302
Joined: Fri Jun 01, 2012 7:45 am
Location: South Carolina, U.S.A.
Contact:

Re: Chain: a utility function for avoiding callback hell

Post by ejmr »

Very cool collection---thank you for sharing it!

Re. improving the documentation, one minor thing is that you can have syntax highlighting for the example code. In the Markdown, instead of indenting the examples by four spaces, you can surround them with grave accents / backticks and the name of the programming language like so...

Code: Select all

```lua
...example code here...
```
...which will cause GitHub to apply syntax highlighting to the examples. A trivial yet useful thing in my opinion.
ejmr :: Programming and Game-Dev Blog, GitHub
南無妙法蓮華經
Post Reply

Who is online

Users browsing this forum: No registered users and 49 guests