Live data from Hacker News

Kal – a clean JavaScript alternative without callbacks

rzimmerman.github.io

11–20 of 130 posts

Re: Kal – a clean JavaScript alternative without callbacks

#11
post #7

The title is kinda funny to the russian ear because kal means feces in Russian :)

That is really unfortunate...

I chose it because it in Hebrew it roughly means something like easy/simple/BASIC.

edit: More importantly, does that make you more or less likely to use it?

Re: Kal – a clean JavaScript alternative without callbacks

#12

This is a project I've been working on in my spare time for a while now and I've finally decided to throw it out there and get some feedback. Do you think the 'wait for' callback syntax is useful? What big features do you think are missing?

This is a fantastic spare time project. At the very least, it will be a beautiful feather in your cap :)

Re: Kal – a clean JavaScript alternative without callbacks

#16
post #4

https://github.com/kriskowal/q solves this today without needing to cross compile. http://koush.com/post/yield-await-v8 will address this natively however unlike Q or Kal you can't start using it today.

There is no need for hacks, just run node with the `--harmony` flag to get yield support today. Q is a huge, monster library. It's 2x the size of caolan/async, which is already bloated. I personally think it's better to use https://github.com/mbostock/queue or another small, understandable library.

Respectfully, is it possible you've confused Q with something else? I compressed and minified both caolan/async and kriskowal/q. Result: async is 3.4 KB, q is 4.1 KB.

I grant you that mbostock's queue is even smaller, but all are so tiny as to be a trivial download even on mobile.

The important issue here is IMHO not the size of the libraries, but how much they help you write maintainable code.

Re: Kal – a clean JavaScript alternative without callbacks

#19
Excellent work. Especially useful since it appears to throw exceptions. That means it's a step up from Iced Coffeescript.

The syntax is a little verbose and might be shortened to something like C#: `user = await db.users.findOne {name:userName}`. Would be a lot more clear to me.

Re: Kal – a clean JavaScript alternative without callbacks

#20

i really like the syntax - really close to english. is there a side-by-side comparison of kal and the generated javascript?

Thanks for the suggestion. The closest to a side by side is here (http://rzimmerman.github.io/kal/#asynchronous-wait), and also the table of operators in the readme (https://github.com/rzimmerman/kal/blob/master/README.md#oper...). Also the examples directory on the github repo.

Apologies if you saw these already. I'll add something like what you suggested, though.

Post reply on HN