CommunityNews

CommunityNews

A Model for Reasoning About JavaScript Promises (2017)

In JavaScript programs, asynchrony arises in situations such as web-based user-interfaces, communicating with servers through HTTP requests, and non-blocking I/O. Event-based programming is the most popular approach for managing asynchrony, but suffers from problems such as lost events and event races, and results in code that is hard to understand and debug. Recently, ECMAScript 6 has added support for promises, an alternative mechanism for managing asynchrony that enables programmers to chain asynchronous computations while supporting proper error handling. However, promises are complex and error-prone in their own right, so programmers would benefit from techniques that can reason about the correctness of promise-based code.
Since the ECMAScript 6 specification is informal and intended for implementers of JavaScript engines, it does not provide a suitable basis for formal reasoning. This paper presents λp , a core calculus that captures the essence of ECMAScript 6 promises. Based on λp , we introduce the promise graph, a program representation that can assist programmers with debugging of promise-based code. We then report on a case study in which we investigate how the promise graph can be helpful for debugging errors related to promises in code fragments posted to the StackOverflow website.

This thread was posted by one of our members via one of our news source trackers.

/js
0 1014 0

Where Next?

Popular Frontend topics Top

AstonJ
By @kobaltz Here’s a related thread about StimulusReflex - an exciting new way to build modern, reactive, real-time apps with Rails.
0 1012 0
New
First poster: bot
When web accessibility comes to mind most people think of just adding an alt text to an image, but there is much more to it! This article...
0 770 0
New
First poster: bot
Last year I created Pomodone, a small time tracking application based on the Pomodoro technique of working in 25 minute intervals. It’s a...
0 1142 0
New
First poster: bot
This guide is intended to cover everything you need to know about creating, manipulating and comparing strings in JavaScript. Extra tips...
2 766 0
New
First poster: bot
ES2021 features list as approved by the Ecma General Assembly Logical Assignment Operators (&&= | Numeric Separators (1_000) ...
/js
0 1035 0
New
First poster: bot
Here’s what I think: if you are building websites, you don’t need React (in most cases). I have been building websites for over nine yea...
0 1116 0
New
First poster: bot
Since the Humio web client is built in Elm, I’d like to share some of our learnings with Elm over the years. Specifically, working with U...
0 821 0
New
First poster: bot
Holograms, light-leaks and how to build CSS-only shaders - Robb Owen . Get a shiny WebGL look without actually using WebGL. In this arti...
0 791 0
New
ragamuf
A little halloween hocus-pocus on the value proposition of having a reliable test suite in place. You are not scared, are you?
4 671 2
New
sundi
Learn to customize the Error HTML module in Phoenix LiveView, while enhancing the UX and retaining the typed URLs on branded 404 pages. ...
1 646 0
New

Other popular topics Top

AstonJ
What chair do you have while working… and why? Is there a ‘best’ type of chair or working position for developers?
74 4882 41
New
AstonJ
There’s a whole world of custom keycaps out there that I didn’t know existed! Check out all of our Keycaps threads here: https://forum....
15 8183 19
New
Exadra37
Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
10 5256 6
New
AstonJ
If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
3 3675 3
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
21 11128 7
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
37 2727 14
New
mafinar
This is going to be a long an frequently posted thread. While talking to a friend of mine who has taken data structure and algorithm cou...
108 9152 31
New
AstonJ
If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol: bre...
4 4891 0
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
4 3745 1
New
PragmaticBookshelf
Author Spotlight: Karl Stolley @karlstolley Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Karl ...
31 3800 16
New