Tagged articles
53 articles
Page 1 of 1
php Courses
php Courses
Dec 18, 2025 · Backend Development

Master PHP Closures: Build Flexible Functions with Anonymous Functions

This article explains PHP closures, showing their basic syntax, how to use them as function arguments, and how to generate dynamic functions at runtime with clear code examples that illustrate creating reusable and adaptable anonymous functions.

anonymous functioncallbackclosure
0 likes · 5 min read
Master PHP Closures: Build Flexible Functions with Anonymous Functions
Python Programming Learning Circle
Python Programming Learning Circle
Sep 23, 2025 · Fundamentals

Unlock Python Power: Master Decorators in Minutes

This article explains Python decorators—from basic analogies and the underlying concepts of higher‑order functions and closures to practical examples like timing and logging decorators—showing how to enhance functions dynamically without altering their source code while preserving metadata with functools.wraps.

Code ExampleDecoratorHigher-order function
0 likes · 8 min read
Unlock Python Power: Master Decorators in Minutes
Python Crawling & Data Mining
Python Crawling & Data Mining
Sep 10, 2025 · Fundamentals

Master Python Decorators: Boost Your Functions in Minutes

This article explains Python decorators with clear analogies, walks through the underlying concepts of higher‑order functions and closures, provides practical code examples such as timing and logging decorators, discusses common pitfalls like lost metadata, and shows how to preserve it using functools.wraps.

Best practiceHigher-order functionPython
0 likes · 10 min read
Master Python Decorators: Boost Your Functions in Minutes
Sohu Smart Platform Tech Team
Sohu Smart Platform Tech Team
Aug 8, 2025 · Mobile Development

Unlocking the Secrets of Objective‑C Blocks: From Syntax to Runtime Mechanics

This article demystifies Objective‑C blocks by explaining their definition, practical uses, syntax variations, common usage scenarios, underlying data structures and compilation process, copy semantics, variable capture rules, reference‑cycle pitfalls, and provides concise code examples and reference links for iOS developers.

BlocksCompilationMemory Management
0 likes · 15 min read
Unlocking the Secrets of Objective‑C Blocks: From Syntax to Runtime Mechanics
php Courses
php Courses
Apr 28, 2025 · Backend Development

Using Closure Functions to Encapsulate Reusable Code Blocks in PHP

This article explains how PHP closures can capture external variables, demonstrates practical examples of wrapping reusable logic in anonymous functions, and shows how to combine closures with object‑oriented programming to improve code reuse and maintainability.

Anonymous FunctionsPHPclosure
0 likes · 5 min read
Using Closure Functions to Encapsulate Reusable Code Blocks in PHP
php Courses
php Courses
Apr 8, 2025 · Fundamentals

Understanding Python Closures and Decorators

This article explains Python closures and decorators, detailing their definitions, formation conditions, practical examples, common use cases, and how decorators rely on closures, while providing code snippets for counters, timing, and repeatable execution.

DecoratorFunction WrappingHigher-Order Functions
0 likes · 14 min read
Understanding Python Closures and Decorators
JavaScript
JavaScript
Mar 16, 2025 · Frontend Development

Master JavaScript Closures: 10 Must‑Know Interview Questions & Answers

This comprehensive guide explains JavaScript closures, covering their definition, memory‑leak risks, loop pitfalls, private variables, this binding, module pattern, static scope, performance impact, and currying, each with clear answers and practical code examples for front‑end interview preparation.

JavaScriptclosureinterview
0 likes · 17 min read
Master JavaScript Closures: 10 Must‑Know Interview Questions & Answers
Raymond Ops
Raymond Ops
Feb 15, 2025 · Backend Development

Why Switch from PHP to Go? Boosting Concurrency for Live Streaming

This article explains why backend developers are moving from PHP to Go, demonstrates how Go's built-in concurrency primitives like sync.WaitGroup and errgroup simplify high‑traffic live‑streaming services, and warns about common closure pitfalls when launching goroutines in loops.

Goclosureconcurrency
0 likes · 10 min read
Why Switch from PHP to Go? Boosting Concurrency for Live Streaming
php Courses
php Courses
Jan 8, 2025 · Backend Development

Using Closure Functions to Encapsulate Reusable Code Blocks in PHP

This article explains how PHP closure functions can encapsulate reusable code blocks, demonstrates basic closure syntax, shows how to pass closures for data processing, and illustrates combining closures with object-oriented programming to enhance flexibility and maintainability.

Object-OrientedPHPclosure
0 likes · 4 min read
Using Closure Functions to Encapsulate Reusable Code Blocks in PHP
php Courses
php Courses
Nov 15, 2024 · Backend Development

Using Closure Functions to Encapsulate Reusable Code Blocks in PHP

This article explains the DRY principle in PHP and demonstrates how to create and apply closure functions for reusable code blocks, including examples with simple calculations, data processing callbacks, and integration with object‑oriented programming to improve flexibility and maintainability.

Backend DevelopmentOOPPHP
0 likes · 5 min read
Using Closure Functions to Encapsulate Reusable Code Blocks in PHP
Test Development Learning Exchange
Test Development Learning Exchange
Nov 2, 2024 · Fundamentals

Understanding Python Decorators: Concepts, Examples, and Practical Uses

This article explains Python decorators, covering their definition as higher‑order functions, essential concepts like closures, step‑by‑step examples of basic, parameterized, class‑based, and stateful decorators, as well as practical uses such as logging and caching, all illustrated with clear code snippets.

DecoratorHigher-order functioncaching
0 likes · 6 min read
Understanding Python Decorators: Concepts, Examples, and Practical Uses
php Courses
php Courses
Oct 31, 2024 · Backend Development

Function Object Programming in PHP: Concepts, Advantages, and Practical Examples

Function Object Programming (FOP) in PHP leverages the Closure class to treat functions as first‑class objects, offering code reuse, modularity, performance gains, and testability, with examples of creating, invoking, and applying closures in higher‑order functions and callbacks.

Backend DevelopmentFunction ObjectsHigher-Order Functions
0 likes · 4 min read
Function Object Programming in PHP: Concepts, Advantages, and Practical Examples
php Courses
php Courses
Aug 13, 2024 · Backend Development

Using Closure Functions to Encapsulate Reusable Code Blocks in PHP

This article explains how PHP closures can be used to encapsulate reusable code blocks, demonstrates practical examples including simple closures, passing closures as callbacks, and combining closures with object‑oriented programming to improve code reuse and maintainability.

closurecode-reuse
0 likes · 5 min read
Using Closure Functions to Encapsulate Reusable Code Blocks in PHP
php Courses
php Courses
Jul 5, 2024 · Backend Development

Using Closure Functions to Encapsulate Reusable Code Blocks in PHP

This article explains how PHP closure functions can be used to encapsulate reusable code blocks, demonstrates practical examples including simple arithmetic, data processing with callbacks, and integration with object‑oriented programming to improve code maintainability and flexibility.

OOPPHPclosure
0 likes · 4 min read
Using Closure Functions to Encapsulate Reusable Code Blocks in PHP
php Courses
php Courses
Apr 2, 2024 · Backend Development

Using PHP Closure Functions to Encapsulate Reusable Code Blocks

This article explains the DRY principle in PHP, introduces closure functions, and demonstrates how to wrap reusable code blocks—including data processing and object‑oriented examples—using closures to improve maintainability and flexibility.

closurereusable code
0 likes · 4 min read
Using PHP Closure Functions to Encapsulate Reusable Code Blocks
php Courses
php Courses
Feb 19, 2024 · Fundamentals

Understanding Callbacks, Anonymous Functions, and Closures in PHP

This article explains the concepts of callbacks, anonymous functions, and closures in PHP, providing definitions, practical examples, and demonstrating how to implement sorting with callback functions, create inline anonymous functions, and use closures to capture external variables, highlighting their benefits for code reuse and readability.

PHPanonymous functioncallback
0 likes · 7 min read
Understanding Callbacks, Anonymous Functions, and Closures in PHP
php Courses
php Courses
Nov 1, 2023 · Backend Development

Understanding PHP Closure Functions: Definition, Usage, and Examples

This article explains PHP closure functions, covering their definition, syntax, typical use cases such as event handling, asynchronous programming and functional programming, provides code examples, discusses advantages, cautions, and demonstrates how closures improve code clarity and flexibility.

Backend DevelopmentPHPclosure
0 likes · 4 min read
Understanding PHP Closure Functions: Definition, Usage, and Examples
php Courses
php Courses
Oct 28, 2023 · Backend Development

Understanding PHP Closure Functions: Definition, Usage, and Examples

This article explains PHP closure functions, covering their definition, typical use cases such as event handling, asynchronous and functional programming, detailed syntax examples, usage patterns, precautions, advantages, and a practical example of handling asynchronous results.

BackendPHPclosure
0 likes · 4 min read
Understanding PHP Closure Functions: Definition, Usage, and Examples
Bilibili Tech
Bilibili Tech
Jul 21, 2023 · Backend Development

Understanding and Avoiding Pitfalls of Closures in Go

The article explains Go closures, shows how capturing loop variables by reference can cause bugs like repeated values, demonstrates correct patterns such as copying variables inside loops or passing them as parameters, and offers guidelines to avoid common pitfalls with defer and concurrency.

GoPitfallanonymous function
0 likes · 11 min read
Understanding and Avoiding Pitfalls of Closures in Go
政采云技术
政采云技术
Mar 21, 2023 · Frontend Development

Understanding the this Binding in JavaScript

This article explains how the this keyword is bound in JavaScript, covering default, implicit, explicit, new, and arrow‑function bindings, and demonstrates the concepts with practical debounce examples and code snippets to show how the calling context determines the value of this.

DebounceJavaScriptclosure
0 likes · 12 min read
Understanding the this Binding in JavaScript
FunTester
FunTester
Sep 28, 2022 · Backend Development

Seamlessly Convert Java Functional Interfaces to Groovy Closures

This article explains the compatibility challenges between Java functional interfaces and Groovy closures, introduces a utility class that converts Supplier, Function, Predicate, and Consumer into Groovy closures, and provides a complete code example with demonstration and output.

BackendFunctional InterfaceGroovy
0 likes · 5 min read
Seamlessly Convert Java Functional Interfaces to Groovy Closures
JavaScript
JavaScript
Apr 21, 2022 · Frontend Development

Mastering JavaScript Closures: From Free Variables to Real-World Use Cases

This article explains free variables, defines closures in ECMAScript, shows why every function is a closure, and provides practical examples—including common interview pitfalls and solutions—illustrating how closures capture and preserve lexical scope in JavaScript.

Free VariableIIFEJavaScript
0 likes · 5 min read
Mastering JavaScript Closures: From Free Variables to Real-World Use Cases
Sohu Tech Products
Sohu Tech Products
Feb 23, 2022 · Mobile Development

iOS Closures – Part Two

This article provides an in‑depth exploration of Swift closures on iOS, covering their definition, three forms, practical use cases, underlying SIL generation, capture lists, context capture, storage mechanisms, escaping and autoclosure variants, and important memory‑management considerations such as reference cycles.

Capture Listautoclosureclosure
0 likes · 17 min read
iOS Closures – Part Two
FunTester
FunTester
Oct 19, 2021 · Backend Development

Mimicking Go’s ‘go’ Keyword in Java and Groovy with Thread Pools

This article explains how to achieve Go‑style asynchronous execution in Java and Groovy by leveraging closures, the java.util.function.Supplier interface, custom thread‑pool wrappers, and Phaser‑based synchronization, complete with practical code examples and a custom ThreadFactory implementation.

AsyncGroovyJava
0 likes · 7 min read
Mimicking Go’s ‘go’ Keyword in Java and Groovy with Thread Pools
Python Programming Learning Circle
Python Programming Learning Circle
Sep 23, 2021 · Fundamentals

Understanding Python Closure Late Binding and How to Fix It

This article explains Python's closure late-binding behavior that causes unexpected lambda results, demonstrates the issue with a sample interview question, and presents four practical solutions—including default‑argument binding, functools.partial, generator expressions, and yield‑based lazy evaluation—to achieve the intended outputs.

Pythonclosurefunction
0 likes · 4 min read
Understanding Python Closure Late Binding and How to Fix It
Node Underground
Node Underground
May 14, 2021 · Frontend Development

What Is a JavaScript Activation Object and Why It Still Matters

This article explains the historic concept of Activation (or Variable) Objects in ECMAScript 1/3, how they were replaced by Lexical Environments in ES5+, and how the broader notion still helps understand closures and stack frames in modern JavaScript.

Activation ObjectECMAScriptLexical Environment
0 likes · 9 min read
What Is a JavaScript Activation Object and Why It Still Matters
ELab Team
ELab Team
Apr 21, 2021 · Frontend Development

Master JavaScript Scope, Context, and Closures: From Basics to React

This article explains JavaScript’s scope types, execution context, activation objects, and the lifecycle of functions, illustrating how closures retain memory, how garbage collection works, and provides practical solutions for common closure pitfalls in React functional components.

JavaScriptReactclosure
0 likes · 12 min read
Master JavaScript Scope, Context, and Closures: From Basics to React
php Courses
php Courses
Apr 7, 2021 · Backend Development

Using Namespaces, Aliases, Traits, and Closures in PHP

This article demonstrates how to use PHP namespaces with the `use` keyword, create aliases for classes, functions, and constants, incorporate traits, and capture variables in anonymous functions, providing clear code examples for each concept.

AliasNamespaceclosure
0 likes · 2 min read
Using Namespaces, Aliases, Traits, and Closures in PHP
php Courses
php Courses
Nov 13, 2020 · Backend Development

Understanding PHP Closure Class: bind, bindTo and Practical Usage Examples

This article explains the PHP Closure class, its bind and bindTo methods, how to control $this and scope when copying anonymous functions, and provides multiple code examples—including common pitfalls and a Composer autoload trick—to help developers master closure binding in backend development.

BINDanonymous-functionbindTo
0 likes · 8 min read
Understanding PHP Closure Class: bind, bindTo and Practical Usage Examples
MaGe Linux Operations
MaGe Linux Operations
Oct 25, 2020 · Fundamentals

Master Python Decorators: From Basics to Advanced Usage

This article explains what Python decorators are, how they work as closures to extend function behavior without altering source code, and provides clear examples—including basic syntax, syntactic sugar with @, execution timing, common use cases, and advanced patterns such as parameterized, multi‑decorator, and class‑based decorators.

Code Examplesclosuredecorators
0 likes · 9 min read
Master Python Decorators: From Basics to Advanced Usage
Python Programming Learning Circle
Python Programming Learning Circle
May 19, 2020 · Fundamentals

Understanding Python Closures, Generators, and the nonlocal Keyword with Multiple Implementation Methods

This article explains how to create a counter using Python closures, explores three different implementations—including mutable objects, generators, and the nonlocal keyword—while clarifying the behavior of immutable vs. mutable objects and demonstrating the practical use of nonlocal in nested functions.

Pythonclosurefundamentals
0 likes · 7 min read
Understanding Python Closures, Generators, and the nonlocal Keyword with Multiple Implementation Methods
Big Data Technology & Architecture
Big Data Technology & Architecture
Mar 11, 2019 · Fundamentals

Understanding Closures in Scala

This article explains the concept of closures, showing how a function can capture external variables, illustrated with Scala examples that demonstrate anonymous functions, free variables, and a complete runnable program producing expected output.

Scalaclosurefunctional
0 likes · 3 min read
Understanding Closures in Scala
MaGe Linux Operations
MaGe Linux Operations
Jul 9, 2017 · Fundamentals

Master Python Decorators: From Basics to Advanced Usage

This article provides a comprehensive guide to Python functions, scopes, variable lifecycles, closures, and decorators, illustrating each concept with clear explanations and runnable code examples, and shows how to create flexible, reusable decorators using @ syntax, *args, and **kwargs.

Decoratorargsclosure
0 likes · 22 min read
Master Python Decorators: From Basics to Advanced Usage
Qunar Tech Salon
Qunar Tech Salon
Jan 9, 2017 · Mobile Development

Understanding Groovy DSL Parsing in Android Gradle Build Scripts

This article explains how Groovy parses Android-specific DSL in Gradle build files, covering DSL benefits, command chains, operator overloading, delegate mechanisms, and step‑by‑step execution of buildscript, repositories, dependencies, and tasks to help developers customize their Android build process.

AndroidDSLGradle
0 likes · 9 min read
Understanding Groovy DSL Parsing in Android Gradle Build Scripts
21CTO
21CTO
Apr 16, 2016 · Frontend Development

Master JavaScript Closures in Minutes: Simple Demo and Real-World Uses

This article demystifies JavaScript closures by presenting a minimal demo, explaining how closures differ from regular functions, illustrating their role in memory management, and showcasing advanced patterns like immediately‑invoked function expressions for practical module creation.

ConceptJavaScriptclosure
0 likes · 7 min read
Master JavaScript Closures in Minutes: Simple Demo and Real-World Uses
21CTO
21CTO
Mar 15, 2016 · Frontend Development

Inside jQuery: Closures, No‑new Instantiation & Chainable Magic

This article dissects jQuery’s source code, revealing its clear modular architecture, closure-based sandbox, innovative no‑new instantiation, extensive method overloads, extend mechanisms, chainable calls with stack tracking, regex optimizations, and conflict‑resolution strategies, offering developers deep insights into its design and performance.

Design PatternsJavaScriptclosure
0 likes · 16 min read
Inside jQuery: Closures, No‑new Instantiation & Chainable Magic
21CTO
21CTO
Mar 8, 2016 · Frontend Development

Master JavaScript Scope & Context: From Basics to Advanced Patterns

This article explains the fundamental differences between scope and context in JavaScript, covers variable scope, execution contexts, the scope chain, closures, module patterns, call/apply/bind methods, and ES6 arrow functions, providing clear code examples for each concept.

BINDExecutionContextJavaScript
0 likes · 14 min read
Master JavaScript Scope & Context: From Basics to Advanced Patterns
21CTO
21CTO
Oct 11, 2015 · Frontend Development

Unveiling JavaScript Closures: How Scope Chains and Memory Work Under the Hood

This article demystifies JavaScript closures by explaining when they are created, how the scope chain and lexical environments operate, why closures persist in memory, and how nested functions and the garbage collector interact, illustrated with clear code examples and diagrams.

Memory ManagementScope Chainclosure
0 likes · 16 min read
Unveiling JavaScript Closures: How Scope Chains and Memory Work Under the Hood