4 ms·
Why is this at 44 points? I respect this is trying to hit a nitch but the nitch looks more like a step backwards than forwards. This does not seem more reasonab
by formula1 10y ago
Why is this at 44 points? I respect this is trying to hit a nitch but the nitch looks more like a step backwards than forwards. This does not seem more reasonable than what we have available. Maybe when it handles promises will it have a more obvious use case.
- whiddershins 10y ago*niche
- deleted 10y ago[deleted]
- oluwie 10y agoWhy does this need promises? Logic operations in JS doesn't do any I/O operations. Making this promises compliant is just overkill.
- formula1 10y agoTo me originally I thought it was just a library that replaced || with or() with no added benefit while promise support would have at least reduced the amount of overhead to create a readable logic wuth asynchronous situations (which is common in js). I now understand thos is a step towards making test code and runnable code one in the same.
- pjonesdotca 10y agoniche not nitch
- TheRealPomax 10y agoWhat we have available cannot do what this does - logical resolution. The point is not the syntax for boolean operatons, it's that it can find solutions by resolving logical expressions against each other in a way that lets you say "add(2,x)=6, what is x?" and get an answer from the solver. This is basically doing Prolog using JavaScript, a thing vanilla JS is absolutely not equipped for.
- formula1 10y agoThank you. You have introduced me to something I can get excited about
- dymk 10y agoThere's absolutely nothing about this that would benefit from having promises - none of the operations performed are blocking. It's constraint solving, not I/O.
- formula1 10y agoI was unfamiliar with the use case that this offers and thought it was a mostly useless replacement or what we already have available.
- hrjet 10y agoPromises can be helpful in a pure CPU bound workload as well: they help to avoid blocking the main thread, by yielding more often. This is typically done by breaking a long running computation into a series of sub-computations that are scheduled on a timer, and the top level API returns a Promise that completes when all computations are over. The same goal could also be achieved with multiple threads (webworkers for example). But the promises and async/await syntax is more convenient.