Tagged articles
yield
28 articles · Page 1 of 1
This article traces the evolution of Java's switch statement from a cumbersome statement to a modern expression, detailing the six shortcomings of the traditional switch, the introduction of arrow syntax and preview mode in Java 12, the yield keyword in Java 13, the standardization in Java 14, and the powerful pattern‑matching and null‑handling features added in Java 17, while providing concrete code examples and practical guidance.
Code ExamplesJavaJava 17
0 likes · 19 min read

The article explains how Ethereum’s built‑in issuance rules, total ETH staked, and market dynamics such as priority fees and MEV combine to push staking APY from early double‑digit levels down to the current 3‑4% range.
BlockchainEthereumMEV
0 likes · 7 min read

This article compares PHP's yield and Fiber constructs, explaining their differing stack models, usage patterns, performance trade‑offs, and how developers can decide which mechanism best fits simple iteration or complex concurrent workloads.
BackendFiberPHP
0 likes · 7 min read

This article explains Python iterators, iterables, and generators, detailing their definitions, core methods, advantages, disadvantages, and practical code examples—including iterator objects, generator creation via comprehensions and the yield keyword, decorator integration, and mutable data handling—providing a comprehensive guide for developers.
DecoratorIterablePython
0 likes · 14 min read

This article walks through Python generators in depth—covering basic yield behavior, the __next__, send, throw, and close methods, pre‑activation states, delegation with yield from, generator expressions pitfalls, and their role in coroutine implementation—while briefly recounting a personal conflict that sparked the write‑up.
CoroutinesPythonSend
0 likes · 28 min read

This article explains Python generators, covering generator functions and expressions, their usage with yield, the send method, and the underlying CPython state‑machine implementation, illustrated with clear code examples; it also discusses how generators manage execution flow and improve memory efficiency.
Pythongeneratorsprogramming fundamentals
0 likes · 6 min read

This article explains PHP generator functions, covering their purpose for memory‑efficient data iteration, streaming, and asynchronous tasks, detailing their syntax with the yield statement, providing multiple code examples, outlining advantages, usage notes, and concluding with best‑practice recommendations.
asynchronousiterationmemory-efficient
0 likes · 5 min read

This article explains how the PHP yield keyword creates generators that allow lazy iteration over large data sets, large files, or infinite sequences, reducing memory consumption and improving performance by pausing and resuming function execution without returning the entire collection at once.
PHPyield
0 likes · 7 min read

This article explains what coroutines are, how they differ from ordinary functions by supporting multiple pause points, demonstrates their behavior with Python code and visual diagrams, covers their historical origins, and details low‑level implementation using stack frames and heap allocation for efficient user‑level concurrency.
Asynchronous ProgrammingPythoncoroutine
0 likes · 13 min read

JavaScript Generators, introduced in ES6, allow functions to pause and resume execution, yielding multiple values; this article explains their syntax, basic usage, advanced features like yield* and data exchange, and demonstrates practical scenarios such as asynchronous flow control, memory-efficient data processing, and state machine implementation.
JavaScriptasyncdata processing
0 likes · 11 min read

This article explains Java 14’s revamped switch expression syntax—including the concise case‑label arrow, the new yield keyword for returning values, and improved NullPointerException messages—showing how these changes simplify code and make debugging clearer.
JavaJava 14Switch Expression
0 likes · 6 min read

This article introduces Python generators, explains how the yield statement creates generator functions, demonstrates usage with example code, compares yield to return, and shows how generator expressions provide memory-efficient iteration similar to list comprehensions.
Pythongenerator expressionsgenerators
0 likes · 4 min read

This article explains the concept of coroutines, compares them with ordinary functions, shows Python code examples of yielding and resuming execution, illustrates their historical background, and describes how they are implemented using heap‑allocated stack frames to achieve lightweight, user‑level concurrency.
ConcurrencyPythoncoroutine
0 likes · 13 min read

This article explains PHP's Generator feature introduced in version 5.5, demonstrating how the yield keyword enables memory‑efficient iteration, how to implement custom xrange functions, and how to control generators with methods like next, current, valid, send, rewind, and throw.
generatoriteratormemory-efficient
0 likes · 6 min read

This article explains Python iterators and generators, covering their core methods, custom iterator classes with __iter__ and __next__, handling StopIteration, and practical generator examples such as a Fibonacci sequence, all illustrated with clear code snippets.
PythonStopIterationTutorial
0 likes · 5 min read

This article explains Python's Global Interpreter Lock, introduces generators and the yield/yield from expressions, demonstrates how they enable coroutine-based asynchronous programming, and provides practical asyncio examples using @asyncio.coroutine, async/await, and futures for efficient I/O handling.
Async/AwaitCoroutinesgenerators
0 likes · 13 min read

This article walks through modernizing a Java switch statement—from the traditional switch with breaks to the concise switch expression introduced in JDK 12, covering enum handling, the new arrow syntax, the yield keyword, compiler warnings, and practical code examples.
Code TutorialJDK13Java
0 likes · 9 min read

This article explains the purpose and behavior of Python's yield keyword, how generators work, their difference from regular functions, and demonstrates practical examples including iterator concepts, itertools utilities, and memory‑efficient looping techniques.
Pythongeneratoriterator
0 likes · 10 min read

This article walks through the evolution of Python's coroutine support—from early generator‑based yield/send patterns, through the introduction of @asyncio.coroutine and yield from, to the modern async and await syntax—explaining concepts, execution flow, and providing clear code examples.
Async/AwaitAsynchronous ProgrammingPython
0 likes · 10 min read

This article explains the concept of coroutines, compares them with threads, lists their pros and cons, demonstrates how Python's yield can implement coroutine behavior with code examples, and then applies a procedural programming approach to build a simple file‑search utility that mimics grep -rl error.
procedural programmingyield
0 likes · 7 min read

This article explains ES6 JavaScript generators, covering their syntax, how they differ from regular iterators, the role of the yield keyword, available generator methods, and practical examples such as custom generators, random number streams, throttling, Fibonacci sequences, and integrating generators with HTML to simplify iterative tasks.
ES6JavaScriptasynchronous
0 likes · 13 min read

This article explains why Python sequences are iterable by detailing how the built‑in iter function, __iter__ and __getitem__ methods work, and shows multiple implementations—including classic iterator classes, generator functions, and generator expressions—to create custom iterable objects.
Iterablefundamentalsgenerator
0 likes · 7 min read

This article explains the concept of coroutines, compares them with threads, outlines their advantages and drawbacks, demonstrates how to implement them in Python using yield, next, send and decorators, and applies them to build a grep‑like file‑search utility.
Pythonasynccoroutine
0 likes · 12 min read

This article explains the inner mechanics of Python generators, covering how the interpreter executes functions, the role of stack frames and bytecode, the generator flag, and how send, yield, and StopIteration interact, illustrated with detailed code examples and disassembly.
PythonStopIterationbytecode
0 likes · 8 min read

This tutorial explains what coroutines are, compares their pros and cons, shows how to implement them in Python with yield, next() and send(), and demonstrates a practical file‑search utility built with procedural programming and generators.
coroutinefile searchprocedural programming
0 likes · 8 min read

This article explains the ES6 yield keyword, its role in generator functions, how the .next() method controls execution flow, how parameters affect yielded values, and provides practical examples to help JavaScript developers master asynchronous iteration.
ES6frontendgenerator
0 likes · 10 min read

This article demystifies the use of yield* in Koa middleware by comparing plain yield with delegating yield, explaining how the co library handles generators and promises, and outlining the practical advantages of native yield* syntax for clarity, performance, and correct this binding.
JavaScriptKoaasync
0 likes · 9 min read

This article explains Java thread scheduling, priority, and the distinct behaviors of the yield() and join() methods, providing code examples that illustrate how each method influences thread execution order and synchronization in multithreaded applications.
Javajointhreading
0 likes · 9 min read
