Tagged articles
7 articles
Page 1 of 1
DaTaobao Tech
DaTaobao Tech
Nov 6, 2024 · Fundamentals

Understanding Java Generics: Origins, Features, and the PECS Principle

Java generics, introduced in Java 5 to replace unsafe Object usage, provide compile‑time type safety, clearer code, and eliminate unchecked casts by allowing type‑parameterized classes, methods, and collections, while type erasure and bridge methods preserve backward compatibility, and the PECS rule (producer extends consumer super) guides safe use of wildcards through covariance and contravariance.

GenericsJavaPECS
0 likes · 11 min read
Understanding Java Generics: Origins, Features, and the PECS Principle
Sohu Tech Products
Sohu Tech Products
Mar 16, 2023 · Mobile Development

Dart Generics: Covariance, Contravariance, and Type Safety

This article explains Dart's generic type system, comparing its covariance, contravariance, and invariance with Java and Kotlin, demonstrates practical code examples, discusses safety concerns of mutable covariant collections, and introduces the 'covariant' keyword for safe method overriding in Flutter development.

DARTFlutterGenerics
0 likes · 24 min read
Dart Generics: Covariance, Contravariance, and Type Safety
Model Perspective
Model Perspective
Jul 29, 2022 · Fundamentals

Unlocking Random Variables: Expectation, Variance, and Higher-Order Moments Explained

This article introduces the key numerical characteristics of random variables—including expectation, variance, covariance, correlation, and higher-order moments such as skewness and kurtosis—explains their definitions, properties, and relationships, and extends these concepts to random vectors and matrix representations.

Momentscovarianceprobability
0 likes · 8 min read
Unlocking Random Variables: Expectation, Variance, and Higher-Order Moments Explained
Model Perspective
Model Perspective
Jul 9, 2022 · Fundamentals

How to Compute Key Statistics with NumPy and Pandas DataFrames

This guide shows how to calculate common statistical measures such as mean, median, range, variance, standard deviation, covariance, and correlation using NumPy functions, and demonstrates the equivalent operations with Pandas DataFrames, including a table of useful DataFrame methods for statistical analysis.

NumPyPythoncorrelation
0 likes · 3 min read
How to Compute Key Statistics with NumPy and Pandas DataFrames
ELab Team
ELab Team
Dec 8, 2021 · Frontend Development

Understanding Covariance, Contravariance, and Bivariance in TypeScript

This article explains TypeScript's covariant, contravariant, bivariant, and invariant type relationships, why methods and function properties behave differently under strictFunctionTypes, how ESLint's @typescript-eslint/method-signature-style rule enforces function property signatures, and practical ways to achieve safer type definitions.

TypeScriptbivariancecontravariance
0 likes · 11 min read
Understanding Covariance, Contravariance, and Bivariance in TypeScript
21CTO
21CTO
Nov 30, 2019 · Backend Development

What’s New in PHP 7.4? Typed Properties, Arrow Functions, and More

PHP 7.4 introduces a suite of powerful features—including typed properties, arrow functions, limited covariance/contravariance, array unpacking, numeric literal separators, short lambda syntax, weak references, throwable __toString() and Opcache preloading—each illustrated with concise code examples for modern backend development.

Arrow FunctionsBackend DevelopmentPHP
0 likes · 5 min read
What’s New in PHP 7.4? Typed Properties, Arrow Functions, and More