User Tools

Site Tools


promises

Promises

Return to Futures, Asynchronous Programming, Asynchrony, Asynchronous Programming Fundamentals

Promises are a programming construct used to handle asynchronous operations, allowing developers to write cleaner, more readable code that can handle operations which may not complete immediately. Several programming languages support promises, either natively or through libraries. Below is a list formatted in MediaWiki syntax, including the official documentation URLs for each language's promise or equivalent feature.

JavaScript

JavaScript is one of the most well-known languages to support promises natively. Promises in JavaScript are used extensively in web development for asynchronous operations like network requests.

Python

Python supports asynchronous programming with its `asyncio` library, which includes features similar to promises, known as “Futures” and “Tasks”.

Swift

Swift supports asynchronous programming with “Promises & Futures” through third-party libraries, such as PromiseKit.

Java

Java does not have a direct equivalent to JavaScript's Promise, but it has the `CompletableFuture` class, introduced in Java 8, which offers similar capabilities for asynchronous programming.

Scala

Scala has “Futures and Promises” as part of its standard library, offering a powerful way to work with asynchronous operations.

C#

C# utilizes the Task Parallel Library (TPL) for asynchronous programming, with `Task` and `Task<T>` being the central types. While not named “Promise”, these Tasks serve a similar purpose.

Ruby

Ruby supports futures and promises through external libraries, such as Concurrent Ruby.

PHP

PHP offers promises through third-party libraries, with Guzzle's promises being one of the popular implementations.

Dart

Dart supports promises with its “Futures” for asynchronous programming, which is a part of the Dart core library.

Kotlin

Kotlin uses coroutines for asynchronous programming, which can be used to achieve behavior similar to promises. For promise-like functionality, Kotlin developers often turn to third-party libraries.

Each of these languages has its own take on asynchronous programming, with promises or similar constructs enabling developers to handle asynchronous tasks more effectively. The official documentation for each provides a comprehensive guide on how to use these features within the respective programming environments.


Snippet from Wikipedia: Promise (disambiguation)

A promise is a transaction whereby a person makes a vow or the suggestion of a guarantee.

Promise(s) may also refer to:

navbar_promises

Concurrency: Concurrency Programming Best Practices, Concurrent Programming Fundamentals, Parallel Programming Fundamentals, Asynchronous I/O, Asynchronous programming (Async programming, Asynchronous flow control, Async / await), Asymmetric Transfer, Akka, Atomics, Busy waiting, Channels, Concurrent, Concurrent system design, Concurrency control (Concurrency control algorithms‎, Concurrency control in databases, Atomicity (programming), Distributed concurrency control, Data synchronization), Concurrency pattern, Concurrent computing, Concurrency primitives, Concurrency problems, Concurrent programming, Concurrent algorithms, Concurrent programming languages, Concurrent programming libraries‎, Java Continuations, Coroutines, Critical section, Deadlocks, Decomposition, Dining philosophers problem, Event (synchronization primitive), Exclusive or, Execution model (Parallel execution model), Fibers, Futures, Inter-process communication, Linearizability, Lock (computer science), Message passing, Monitor (synchronization), Computer multitasking (Context switch, Pre-emptive multitasking - Preemption (computing), Cooperative multitasking - Non-preemptive multitasking), Multi-threaded programming, Multi-core programming, Multi-threaded, Mutual exclusion, Mutually exclusive events, Mutex, Non-blocking algorithm (Lock-free), Parallel programming, Parallel computing, Process (computing), Process state, Producer-consumer problem (Bounded-buffer problem), Project Loom, Promises, Race conditions, Read-copy update (RCU), Readers–writer lock, Readers–writers problem, Recursive locks, Reducers, Reentrant mutex, Scheduling (computing)‎, Semaphore (programming), Seqlock (Sequence lock), Serializability, Shared resource, Sleeping barber problem, Spinlock, Synchronization (computer science), System resource, Thread (computing), Tuple space, Volatile (computer programming), Yield (multithreading), Concurrency bibliography, Manning Concurrency Async Parallel Programming Series, Concurrency glossary, Awesome Concurrency, Concurrency topics, Functional programming. (navbar_concurrency - see also navbar_async, navbar_python_concurrency, navbar_golang_concurrency, navbar_java_concurrency)

Async Programming: Async Programming Best Practices, Asynchronous Programming Fundamentals, Promises and Futures, Async C, Async C++, Async C, Async Clojure, Async Dart, Async Golang, Async Haskell, Async Java (RxJava), Async JavaScript, Async Kotlin, Async PowerShell, Async Python, Async Ruby, Async Scala, Async TypeScript, Async Programming Bibliography, Manning Concurrency Async Parallel Programming Series. (navbar_async - see also navbar_concurrency, navbar_python_concurrency, navbar_golang_concurrency, navbar_java_concurrency)


Cloud Monk is Retired (for now). Buddha with you. © 2005 - 2024 Losang Jinpa or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


promises.txt · Last modified: 2024/03/14 18:40 by 127.0.0.1