Tag

class

1 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 10, 2024 · Frontend Development

Why We Avoid Using interface and type for Business Data Structures in TypeScript

The article explains why declaring business data structures with TypeScript's interface or type is discouraged, illustrates practical problems such as property name changes and type mismatches, and advocates using classes to gain decorator support, combined behavior and data, and better extensibility.

DecoratorsDesign PatternsTypeScript
0 likes · 8 min read
Why We Avoid Using interface and type for Business Data Structures in TypeScript
Sohu Tech Products
Sohu Tech Products
Dec 6, 2023 · Fundamentals

Understanding JavaScript Constructors, Prototypes, Classes, and Inheritance

The article thoroughly explains JavaScript constructors, prototype chains, the this binding, and ES6 class syntax, showing how functions become constructors with new, how prototypes link objects, custom new/instanceof implementations, and various inheritance patterns—including parasitic combination inheritance realized by class extends and super.

ConstructorES6Inheritance
0 likes · 22 min read
Understanding JavaScript Constructors, Prototypes, Classes, and Inheritance
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Jun 16, 2023 · Fundamentals

The Semantics of nil in Swift

The article explains that Swift’s nil differs from Objective‑C’s null pointer by representing ‘no value’ for any type through optionals, details how various optionals (Bool?, String?, class?, enum?) are encoded in memory, shows the extra byte cost for Int?, and advises minimizing optional Int fields in structs, using 0 when appropriate.

Memory OptimizationSwiftValue Types
0 likes · 6 min read
The Semantics of nil in Swift
php中文网 Courses
php中文网 Courses
Mar 25, 2023 · Backend Development

PHP Calendar Class Tutorial with Full Implementation

This tutorial explains how to build a reusable PHP Calendar class that handles year, month, navigation and renders an HTML table, and shows a simple front‑end script that loads the class and displays the calendar, complete with CSS styling and example output.

Date HandlingPHPTutorial
0 likes · 10 min read
PHP Calendar Class Tutorial with Full Implementation
Python Programming Learning Circle
Python Programming Learning Circle
Mar 17, 2022 · Fundamentals

Understanding the self Parameter in Python Classes

This article explains the purpose of the self parameter in Python classes, using analogies and concrete code examples to show how self represents the instance itself, how it is passed automatically, and how different objects produce distinct self values when methods are invoked.

InstanceTutorialclass
0 likes · 5 min read
Understanding the self Parameter in Python Classes
政采云技术
政采云技术
Mar 8, 2022 · Frontend Development

Understanding and Using Decorators in JavaScript (Frontend Development)

This article introduces JavaScript decorators, explains their relation to the decorator design pattern, shows how to configure Babel for decorator support, demonstrates class and method decorator syntax with detailed code examples, and discusses practical usage scenarios and execution order in modern front‑end projects.

BabelDesign PatternJavaScript
0 likes · 13 min read
Understanding and Using Decorators in JavaScript (Frontend Development)
Python Programming Learning Circle
Python Programming Learning Circle
Mar 25, 2021 · Fundamentals

Understanding Python Class Inheritance, Subclassing, and Multiple Inheritance

This article explains Python's inheritance mechanism, showing how subclasses can reuse and extend parent class functionality, demonstrates the syntax for single and multiple inheritance, and illustrates method resolution order with clear code examples.

InheritanceMultiple Inheritanceclass
0 likes · 6 min read
Understanding Python Class Inheritance, Subclassing, and Multiple Inheritance
Python Programming Learning Circle
Python Programming Learning Circle
Dec 21, 2020 · Fundamentals

Understanding Python Decorators: Function, Class, and Multi‑Layer Decorators

This article explains the concept, syntax, and practical examples of Python decorators—including function decorators, class‑based decorators, multi‑layer decorators, and class‑as‑decorator patterns—providing clear code snippets and execution results to help readers master decorator usage.

Code ExampleProgrammingclass
0 likes · 15 min read
Understanding Python Decorators: Function, Class, and Multi‑Layer Decorators
Python Programming Learning Circle
Python Programming Learning Circle
Apr 6, 2020 · Fundamentals

Understanding Python Class Inheritance: Five Common Techniques

This article explains the fundamentals of Python class inheritance, covering five typical ways to use parent class attributes and methods—including direct calls, super() for private members, method overriding, invoking __init__, and passing initialization parameters—accompanied by clear code examples.

Inheritanceclassinit
0 likes · 6 min read
Understanding Python Class Inheritance: Five Common Techniques
Sohu Tech Products
Sohu Tech Products
Feb 26, 2020 · Frontend Development

Comprehensive Guide to JavaScript Inheritance Types and Their Usage

This article provides a thorough overview of JavaScript inheritance mechanisms—including prototype chain, constructor stealing, combination, parasitic, and ES6 class inheritance—detailing their implementations, advantages, drawbacks, and practical usage with clear code examples and best‑practice recommendations.

ConstructorES5ES6
0 likes · 12 min read
Comprehensive Guide to JavaScript Inheritance Types and Their Usage
Java Captain
Java Captain
Apr 11, 2018 · Fundamentals

Understanding Java Object Members, Methods, and Initialization

This tutorial explains how Java methods access object data members, the role of the implicit this reference, parameter passing, calling other methods within the same object, and both default and explicit initialization of class fields, using clear code examples throughout.

InitializationJavaMethods
0 likes · 5 min read
Understanding Java Object Members, Methods, and Initialization
Java Captain
Java Captain
Mar 17, 2018 · Backend Development

Understanding Java Reflection: Concepts, API Details, and Practical Code Examples

This article explains Java's reflection mechanism, covering how to obtain Class objects, inspect constructors, fields, and methods, invoke them dynamically, run main methods via reflection, use configuration files for flexible execution, and bypass generic type checks with reflective calls.

ConstructorJavaReflection
0 likes · 21 min read
Understanding Java Reflection: Concepts, API Details, and Practical Code Examples
Java Captain
Java Captain
Jan 2, 2018 · Fundamentals

Understanding Java Reflection: Concepts, Common Methods, and Example Exercises

This article explains Java's reflection mechanism, describing how Class objects represent runtime types, how to obtain them, and demonstrating common reflective operations such as inspecting methods, accessing fields, invoking constructors, handling arrays, and solving typical exercises with complete code examples.

JavaReflectionRuntime
0 likes · 11 min read
Understanding Java Reflection: Concepts, Common Methods, and Example Exercises
Java Captain
Java Captain
Aug 22, 2017 · Fundamentals

Understanding Java Reflection: Classes, Methods, Constructors, and Fields

This article explains Java's reflection mechanism, showing how to obtain Class objects, dynamically load classes, and retrieve information about methods, fields, and constructors, accompanied by practical code examples that demonstrate inspecting and invoking members at runtime.

ConstructorJavaReflection
0 likes · 7 min read
Understanding Java Reflection: Classes, Methods, Constructors, and Fields
Baidu Intelligent Testing
Baidu Intelligent Testing
Aug 18, 2017 · Frontend Development

Practical Guide to ES6 Features and Performance Comparisons in Node.js

This article reviews the compatibility of various Node.js versions with ES6 features, explains key ES6 constructs such as let, const, template literals, default parameters, destructuring, and classes, and presents performance benchmarks comparing these features to their ES5 equivalents, concluding with practical recommendations for developers.

ES6JavaScriptNode.js
0 likes · 6 min read
Practical Guide to ES6 Features and Performance Comparisons in Node.js
Hujiang Technology
Hujiang Technology
Jul 6, 2017 · Fundamentals

Kotlin Class Features: Constructors, Modifiers, and Special Classes

This article explains Kotlin class declarations, covering primary and secondary constructors, visibility modifiers, and special class types such as enums, sealed classes, and data classes, with code examples illustrating each concept.

ConstructorData ClassKotlin
0 likes · 7 min read
Kotlin Class Features: Constructors, Modifiers, and Special Classes