algebraic_data_types

Algebraic Data Types

Return to Programming Topics, X, Kotlin glossary, Programming glossary, Kotlin

Snippet from Wikipedia: Algebraic data type

In computer programming, especially functional programming and type theory, an algebraic data type (ADT) is a kind of composite type, i.e., a type formed by combining other types.

Two common classes of algebraic types are product types (i.e., tuples and records) and sum types (i.e., tagged or disjoint unions, coproduct types or variant types).

The values of a product type typically contain several values, called fields. All values of that type have the same combination of field types. The set of all possible values of a product type is the set-theoretic product, i.e., the Cartesian product, of the sets of all possible values of its field types.

The values of a sum type are typically grouped into several classes, called variants. A value of a variant type is usually created with a quasi-functional entity called a constructor. Each variant has its own constructor, which takes a specified number of arguments with specified types. The set of all possible values of a sum type is the set-theoretic sum, i.e., the disjoint union, of the sets of all possible values of its variants. Enumerated types are a special case of sum types in which the constructors take no arguments, as exactly one value is defined for each constructor.

Values of algebraic types are analyzed with pattern matching, which identifies a value by its constructor or field names and extracts the data it contains.

Fair Use Sources

Programming: Programming languages

Variables and Data Types, Control Structures, Functions and Methods, Object-Oriented Programming (OOP), Functional Programming, Procedural Programming, Event-Driven Programming, Concurrent and Parallel Programming, Error Handling and Debugging, Memory Management, Recursion, Algorithms, Data Structures, Design Patterns, Software Development Life Cycle (SDLC), Version Control Systems, Database Programming, Web Development, Mobile App Development, Game Development, Machine Learning and AI Programming, Network Programming, API Development, Security in Programming, Testing and Quality Assurance, User Interface and User Experience Design, Scripting Languages, Assembly Language, High-Level Programming Languages, Low-Level Programming Languages, Compiler Design, Interpreter Design, Garbage Collection, Regular Expressions, Graphical User Interface (GUI) Programming, Command Line Interface Development, Cross-Platform Development, Cloud Computing in Programming, Blockchain Programming, IoT Programming, Embedded Systems Programming, Microservices Architecture, Serverless Architecture, Big Data Technologies, Data Visualization, Data Mining and Analysis, Natural Language Processing (NLP), Computer Graphics Programming, Virtual Reality (VR) Development, Augmented Reality (AR) Development, Cryptography in Programming, Distributed Systems, Real-Time Systems Programming, Operating System Development, Compiler and Interpreter Development, Quantum Computing, Software Project Management, Agile Methodologies, DevOps Practices, Continuous Integration and Continuous Deployment (CI/CD), Software Maintenance and Evolution, Software Licensing, Open Source Development, Accessibility in Software Development, Internationalization and Localization, Performance Optimization, Scalability Techniques, Code Refactoring, Design Principles, API Design, Data Modeling, Software Documentation, Peer-to-Peer Networking, Socket Programming, Front-End Development, Back-End Development, Full Stack Development, Secure Coding Practices, Code Reviews, Unit Testing, Integration Testing, System Testing, Functional Programming Paradigms, Imperative Programming, Declarative Programming, Software Architecture, Cloud-Native Development, Infrastructure as Code (IaC), Ethical Hacking for Developers, Artificial Intelligence Ethics in Programming, Software Compliance and Standards, Software Auditing, Debugging Tools and Techniques, Code Optimization Techniques, Software Deployment Strategies, End-User Computing, Computational Thinking, Programming Logic and Techniques, Advanced Data Management

Agile, algorithms, APIs, asynchronous programming, automation, backend, CI/CD, classes, CLI, client-side, cloud (Cloud Native-AWS-Azure-GCP-IBM Cloud-IBM Mainframe-OCI), comments, compilers, concurrency, conditional expressions, containers, control flow, databases, data manipulation, data persistence, data science, data serialization, data structures, dates and times, debugging, dependency injection, design patterns, DevOps, distributed software, Docker, error handling, file I/O, frameworks, frontend, functions, functional programming, GitHub, history, Homebrew, IDEs, installation, JetBrains, JSON, JSON Web Token (JWT), K8S, lambdas, language spec, libraries, linters, Linux, logging, macOS, methods, ML, microservices, mobile dev, modules, monitoring, multi-threaded, network programming, null, numbers, objects, object-oriented programming, observability, OOP, ORMs, packages, package managers, performance, programmers, programming, reactive, refactoring, reserved words, REST APIs, RHEL, SDK, secrets, security, serverless, server-side, Snapcraft, SQL, StackOverflow, standards, standard library, statements, scope, scripting, syntax, systems programming, TDD, testing, tools, type system, web dev, variables, versions, Ubuntu, unit testing, Windows; topics-courses-books-docs. (navbar_programming - see also navbar_variables, navbar_programming_libraries, navbar_data_structures, navbar_algorithms, navbar_software_architecture, navbar_agile)


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.


algebraic_data_types.txt · Last modified: 2022/08/15 21:29 by 127.0.0.1