# Programming Language Type Systems

A framework for expressing and enforcing safety properties of programs through programming-language types.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## CoordX Types: A Trustless, Swappable Type System for Shared Records

DevFeed: [CoordX Types: A Trustless, Swappable Type System for Shared Records](<https://devfeed.tech/articles/coordx-types-a-trustless-swappable-type-system-for-shared-records-133318.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.16128>)

Author: David Hyland-Wood, Rob Ewin

Published: 2026-11-13T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [schema design](<https://devfeed.tech/topics/schema-design.md>), [trust](<https://devfeed.tech/topics/trust.md>), [data type](<https://devfeed.tech/topics/data-type.md>)

Tags: [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [interpreter](<https://devfeed.tech/tags/interpreter.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [records](<https://devfeed.tech/tags/records.md>), [regular](<https://devfeed.tech/tags/regular.md>), [schemas](<https://devfeed.tech/tags/schemas.md>), [security](<https://devfeed.tech/tags/security.md>), [structure](<https://devfeed.tech/tags/structure.md>), [trust](<https://devfeed.tech/tags/trust.md>), [type-system](<https://devfeed.tech/tags/type-system.md>)

### AI overview

CoordX Types adds meaning to protocol-verified shared-record entries by specifying which entries count, how to interpret their positions, and what parties may or must do. Each type is a signed object fixed by its digest; parties evaluate it independently, without relying on a server, registry, or another party's software. Types identify the interpreter they require, allowing interpreters with different capabilities and designs to coexist in one record. The schema language constrains payloads to regular languages and entry structures to regular tree languages; its rules and computed values are total primitive-recursive functions, so evaluation always halts. The abstract says the paper compares the system with KQML, FIPA-ACL, and CBCL and relates it to language-theoretic security.

### Source excerpt

arXiv:2611.16128v1 Announce Type: new Abstract: The CoordX Protocol carries signed and encrypted entries between parties. It proves who wrote each entry and who had permission to write it. It does not say what an entry means. That task belongs above the protocol layer. This paper describes the CoordX type system, the layer that gives entries a meaning. A type is a short document that says how to read one part of a shared record: which entries count, what each position means, what a party may do there, and what a party must do next. The type system has two key properties. It is trustless: a type is an ordinary signed object fixed by its digest, and every party evaluates it for itself over entries that the CoordX Protocol has already verified. No party has to trust a server, a registry or another party's software. It is swappable: a type names the interpreter it is written for, so many interpreters, of different capabilities and designs, can be used side by side in one record. We describe how to write type schemas, and we define the expressive power of the schema language. Payloads form a regular language. Entry structure forms a regular tree language. Every rule and every computed value is a total function in the primitive recursive class, so evaluation always halts. We compare this with KQML, FIPA-ACL and CBCL, and we relate it to language-theoretic security.

## New in Symfony 8.2: Forms That Read Your Types

DevFeed: [New in Symfony 8.2: Forms That Read Your Types](<https://devfeed.tech/articles/new-in-symfony-8-2-forms-that-read-your-types-121165.md>)

Original publisher: [Read original article](<https://symfony.com/blog/new-in-symfony-8-2-forms-that-read-your-types>)

Author: Javier Eguiluz

Published: 2026-11-06T08:24:00Z

Content type: release

Language: en

Sources: [Symfony](<https://devfeed.tech/sources/symfony-blog.md>)

Topics: [Symfony](<https://devfeed.tech/topics/symfony.md>), [Forms](<https://devfeed.tech/topics/forms.md>), [Data validation](<https://devfeed.tech/topics/data-validation.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>)

Tags: [closure](<https://devfeed.tech/tags/closure.md>), [component](<https://devfeed.tech/tags/component.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [constraint](<https://devfeed.tech/tags/constraint.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [exception](<https://devfeed.tech/tags/exception.md>), [forms](<https://devfeed.tech/tags/forms.md>), [mapping](<https://devfeed.tech/tags/mapping.md>), [null](<https://devfeed.tech/tags/null.md>), [php](<https://devfeed.tech/tags/php.md>), [properties](<https://devfeed.tech/tags/properties.md>), [readonly](<https://devfeed.tech/tags/readonly.md>), [symfony](<https://devfeed.tech/tags/symfony.md>), [types](<https://devfeed.tech/tags/types.md>)

### AI overview

Symfony 8.2 can infer form field types and empty values from PHP property or setter types, reducing repeated configuration for DTOs and attribute-based forms. For example, nullable `int`, `float`, `bool`, and date properties map to corresponding field types; nullable fields remain optional. Empty values for non-nullable `string` and `int` properties become `''` and `0`, while nullable properties keep the prior `null` behavior. `0` still passes `NotBlank`, so numeric fields that must reject emptiness should be nullable. These option guesses apply only when the field type is also inferred; explicitly typed fields still need `empty_data` configured. Forms can now construct readonly DTOs with required constructor arguments and promoted properties, and can edit them by creating a replacement object when readonly fields change. Retrieve updated data with `getData()`. This requires the constructor to promote all class properties; changing readonly fields on other classes, such as entities with private state, still throws.

### Source excerpt

Symfony forms are often backed by a DTO or another class with typed properties. Those types say a lot about each field, but you have to repeat much of that information when creating your forms. In Symfony 8.2, the Form component uses those types, so forms...

## Imprompt: A Language Framework for Prompt Programming

DevFeed: [Imprompt: A Language Framework for Prompt Programming](<https://devfeed.tech/articles/imprompt-a-language-framework-for-prompt-programming-117261.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2607.22683>)

Author: Chentian Wu, Shengyuan Yang, Adithya Murali

Published: 2026-11-04T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>)

Topics: [Prompt Engineering](<https://devfeed.tech/topics/prompt-engineering.md>), [prompt](<https://devfeed.tech/topics/prompt.md>), [Programming Languages / Compilers](<https://devfeed.tech/topics/programming-languages-compilers.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [Transpilers](<https://devfeed.tech/topics/transpilers.md>), [typesafety](<https://devfeed.tech/topics/typesafety.md>)

Tags: [case-studies](<https://devfeed.tech/tags/case-studies.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [cs-pl](<https://devfeed.tech/tags/cs-pl.md>), [decoding](<https://devfeed.tech/tags/decoding.md>), [foundations](<https://devfeed.tech/tags/foundations.md>), [framework](<https://devfeed.tech/tags/framework.md>), [language](<https://devfeed.tech/tags/language.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [programming](<https://devfeed.tech/tags/programming.md>), [prompt](<https://devfeed.tech/tags/prompt.md>), [prompt-engineering](<https://devfeed.tech/tags/prompt-engineering.md>), [prompting](<https://devfeed.tech/tags/prompting.md>), [study](<https://devfeed.tech/tags/study.md>), [type-checking](<https://devfeed.tech/tags/type-checking.md>)

### AI overview

Imprompt frames prompts as programs that describe tasks while leaving lower-level execution details to separate mechanisms. It presents structured prompting as prompt programming plus compilation, formally defines two compilers, and explores prompt-program typing by relating type checking to constrained decoding. The authors report implementing the compilers and type checkers and evaluating them in case studies; the excerpt does not give evaluation results.

### Source excerpt

arXiv:2607.22683v2 Announce Type: replace Abstract: With the unprecedented success of Language Models (LMs), the science of Prompt Engineering has evolved the powerful idea of Prompt Programming, where prompts are treated as a programmable control surface for describing complex tasks and leveraging LM capabilities. However, existing prompt programming frameworks suffer from various complexities and inelegances, which make them hard to utilize in practice for effectively describing tasks. We propose Imprompt, a new language framework for the study and practice of prompt programming. We undertake a foundational investigation of prompt programming, and contend that prompt programs must contain only the task descriptions and must be decoupled from lower-level 'execution' details. We further develop this position by illustrating structured prompting as a combination of prompt programming and prompt program 'compilation'. We exemplify this view by formally defining two compilers for Imprompt programs. We then explore the idea of typing for prompt programs and draw a correspondence between type checking and constrained decoding. Finally, we implement our compilers and type checkers and evaluate them on a variety of case studies. We believe our work contributes programming-language foundations toward the emerging area of prompt programming.

## safeL4: Rethinking Safe-Language-Based Single Address Space Microkernels

DevFeed: [safeL4: Rethinking Safe-Language-Based Single Address Space Microkernels](<https://devfeed.tech/articles/safel4-rethinking-safe-language-based-single-address-space-microkernels-103341.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.35999>)

Author: Zheyuan Xu, Xiaobei Zhang, Zihan Li, Zekai Nie, Guangtao Zhu, Zhuang Lu, Qianying Zhang, Shijun Zhao, Haibo Chen, Rui Hou

Published: 2026-10-28T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [Access Control](<https://devfeed.tech/topics/access-control.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [Memory Safety](<https://devfeed.tech/topics/memory-safety.md>)

Tags: [access-control](<https://devfeed.tech/tags/access-control.md>), [capabilities](<https://devfeed.tech/tags/capabilities.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [cs-os](<https://devfeed.tech/tags/cs-os.md>), [cs-pl](<https://devfeed.tech/tags/cs-pl.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [faster](<https://devfeed.tech/tags/faster.md>), [fine](<https://devfeed.tech/tags/fine.md>), [isolation](<https://devfeed.tech/tags/isolation.md>), [low-level](<https://devfeed.tech/tags/low-level.md>), [operating-systems](<https://devfeed.tech/tags/operating-systems.md>), [performance](<https://devfeed.tech/tags/performance.md>), [rust](<https://devfeed.tech/tags/rust.md>), [safety](<https://devfeed.tech/tags/safety.md>), [system](<https://devfeed.tech/tags/system.md>)

### AI overview

safeL4 proposes a single-address-space microkernel that uses safe-language isolation to reduce the overhead of hardware-based isolation while retaining minimality and fine-grained access control. Its design exposes unsafe operations through low-level abstractions and builds a capability system on the safe language's object capabilities. A Rust prototype reportedly made safeL4's primitives 1.9x faster on average than seL4's; the supplied excerpt does not specify evaluation conditions or broader system-level results.

### Source excerpt

arXiv:2610.35999v1 Announce Type: cross Abstract: Microkernels provide good features such as high security, safety, and flexibility, but their reliance on hardware-based isolation leads to heavy performance overhead, limiting their widespread adoption. Although constructing single-address-space microkernels based on safe language-based isolation is a promising approach to addressing the performance issue, this approach still faces challenges in maintaining the principle of minimality and enforcing capability-based, fine-grained access control over system resources. We propose safeL4, an approach to constructing microkernels based on safe languages. It guarantees minimality through low-level abstractions for unsafe operations, and implements a capability system based on the safe language's object capabilities to achieve fine-grained access control over all operations on system resources. We implement a prototype system in Rust, and our evaluation results show that the primitives provided by safeL4 are, on average, 1.9$\times$ faster than those of seL4.

## New in Symfony 8.2: Generics and Stricter Types in the Serializer

DevFeed: [New in Symfony 8.2: Generics and Stricter Types in the Serializer](<https://devfeed.tech/articles/new-in-symfony-8-2-generics-and-stricter-types-in-the-serializer-102321.md>)

Original publisher: [Read original article](<https://symfony.com/blog/new-in-symfony-8-2-generics-and-stricter-types-in-the-serializer>)

Author: Javier Eguiluz

Published: 2026-10-27T08:12:00Z

Content type: release

Language: en

Sources: [Symfony](<https://devfeed.tech/sources/symfony-blog.md>)

Topics: [Symfony](<https://devfeed.tech/topics/symfony.md>), [union types](<https://devfeed.tech/topics/union-types.md>), [Type Parameter](<https://devfeed.tech/topics/type-parameter.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [Data validation](<https://devfeed.tech/topics/data-validation.md>), [typesafety](<https://devfeed.tech/topics/typesafety.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [collections](<https://devfeed.tech/tags/collections.md>), [generics](<https://devfeed.tech/tags/generics.md>), [json](<https://devfeed.tech/tags/json.md>), [phpdoc](<https://devfeed.tech/tags/phpdoc.md>), [symfony](<https://devfeed.tech/tags/symfony.md>), [types](<https://devfeed.tech/tags/types.md>), [union-types](<https://devfeed.tech/tags/union-types.md>)

### AI overview

Symfony 8.2 improves Serializer denormalization by resolving PHPDoc generic types from the property that holds a generic object, so nested values such as `Page<Product>` items become `Product` instances. This requires PropertyInfo's `PhpStanExtractor` and `phpstan/phpdoc-parser`; the target class name alone does not supply template types. It also denormalizes union-typed collection elements and throws when an element matches no union member or a key violates its key type. A JSON object supplied for `list<string>` still works in 8.2 but triggers a deprecation and will throw `NotNormalizableValueException` in 9.0; use a JSON array for a list, or an array type that permits meaningful keys. TypeInfo adds covariant-template support, `Type::map()` for replacing nested types, and `Type::getMismatches()` for paths and expected/actual types. Because mismatch reporting does more work, call it after `accepts()` returns false.

### Source excerpt

The Serializer component relies on the TypeInfo component to know the type of each property it denormalizes. Symfony 8.2 makes both components understand more of the types you already write in your PHPDoc, such as generics and arrays of union types, and makes...

## Codebase Design for AI Agents: Types, Lint Rules, and CI Gates

DevFeed: [Codebase Design for AI Agents: Types, Lint Rules, and CI Gates](<https://devfeed.tech/articles/codebase-design-for-ai-agents-types-lint-rules-and-ci-gates-90890.md>)

Original publisher: [Read original article](<https://www.sitepoint.com/codebase-design-for-ai-agents/>)

Author: SitePoint Team

Published: 2026-10-20T15:44:18Z

Content type: tutorial

Language: en

Sources: [SitePoint](<https://devfeed.tech/sources/sitepoint.md>)

Topics: [software-architecture](<https://devfeed.tech/topics/software-architecture.md>), [lint](<https://devfeed.tech/topics/lint.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [branch protection rules](<https://devfeed.tech/topics/branch-protection-rules.md>), [identifier](<https://devfeed.tech/topics/identifier.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>)

Tags: [actions](<https://devfeed.tech/tags/actions.md>), [agent](<https://devfeed.tech/tags/agent.md>), [agent-framework](<https://devfeed.tech/tags/agent-framework.md>), [agent-frameworks](<https://devfeed.tech/tags/agent-frameworks.md>), [agents](<https://devfeed.tech/tags/agents.md>), [agents-md](<https://devfeed.tech/tags/agents-md.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [ai-coding](<https://devfeed.tech/tags/ai-coding.md>), [ai-coding-agents](<https://devfeed.tech/tags/ai-coding-agents.md>), [ast](<https://devfeed.tech/tags/ast.md>), [ci](<https://devfeed.tech/tags/ci.md>), [coding](<https://devfeed.tech/tags/coding.md>), [coding-agents](<https://devfeed.tech/tags/coding-agents.md>), [eslint](<https://devfeed.tech/tags/eslint.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [lint](<https://devfeed.tech/tags/lint.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rules](<https://devfeed.tech/tags/rules.md>), [structure](<https://devfeed.tech/tags/structure.md>), [types](<https://devfeed.tech/tags/types.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

### AI overview

The tutorial's central takeaway is to make correct code paths enforceable so AI-generated code must satisfy repository constraints. It layers four guardrails: branded TypeScript types with validated constructors reject raw identifiers at compile time (though direct casts can bypass them); custom AST-based ESLint rules enforce architectural boundaries, with RuleTester fixtures showing permitted and forbidden imports; sequential CI checks type-checking, lint, and tests, while branch protection makes passing checks a merge requirement; and AGENTS.md documents conventions for supported agents but remains a soft guide that can be truncated or misread. The examples require Node.js 20+ and ESLint v9 flat config. The article recommends starting with a critical identifier and a frequently violated boundary, then expanding and maintaining the guidance as the codebase changes.

### Source excerpt

Structure TypeScript repos to constrain AI coding agents with compile-time branded types, AST-based ESLint rules, CI gates, and focused AGENTS.md files. Continue reading Codebase Design for AI Agents: Types, Lint Rules, and CI Gates on SitePoint.

## We have proof automation now

DevFeed: [We have proof automation now](<https://devfeed.tech/articles/we-have-proof-automation-now-36616.md>)

Original publisher: [Read original article](<http://www.imperialviolet.org/2026/07/26/zstd-lean.html>)

Author: Adam Langley

Published: 2026-07-26T00:00:00Z

Content type: article

Language: en

Sources: [ImperialViolet](<https://devfeed.tech/sources/imperialviolet.md>)

Topics: [Lean](<https://devfeed.tech/topics/lean.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [llm-reasoning](<https://devfeed.tech/topics/llm-reasoning.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>)

Tags: [automation](<https://devfeed.tech/tags/automation.md>), [encoding](<https://devfeed.tech/tags/encoding.md>), [invariants](<https://devfeed.tech/tags/invariants.md>), [lean](<https://devfeed.tech/tags/lean.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>), [proofs](<https://devfeed.tech/tags/proofs.md>), [type-system](<https://devfeed.tech/tags/type-system.md>), [types](<https://devfeed.tech/tags/types.md>)

### AI overview

The author reports that several LLMs automatically proved universal properties of a Lean implementation of Zstandard's FSE table construction in about 20 minutes, with the proofs type-checking and no `sorry`s. The work required changing code that used `Id.run`, which was harder for the proof machinery. The author argues that LLMs may reduce the proof effort that has made dependently typed programming impractical, while stressing that larger systems may scale poorly and Lean's toy decoder ran 10x slower than `zstd`. An attempt to prove equivalence between optimized AArch64 assembly and Lean code worked for tiny functions, but the repository's popcount example exceeded the author's system memory and attempts to scale further failed.

### Source excerpt

I've long had a soft spot for dependently-typed languages like Coq Rocq and Lean. They offer the possibility of a type system capable of encoding and enforcing arbitrarily subtle invariants. The sort of thing that, in regular languages, ends up (at best) as a comment, and which quickly gets lost as the size of the team grows. Then you get subtle misunderstandings and components that don't quite fit together. It's often the case that those components have grown to a sufficient size that, when the problem is noticed, aligning either of them is a wearying prospect. Perhaps, say dependent types seductively, you could write those invariants formally and have a machine check them. (p.s. Coq changed its name! I remember many years ago at a Coq conference in Princeton, I tried suggesting that, in an English-speaking world, having a programming language called Coq was an impediment. I don't think the audience agreed at the time. I also joked that many of the talks there sounded like a speech by Tyrion Lannister, there being so many Coqs and Hoares. A joke that was hilarious and timely, even though it fell completely flat, coming as it did before the final season of that show and our collective memory-holing of it.) The problem has always been that with great type-system power comes great proof effort. I can certainly attest to entire days spent proving really quite simple things. Doing proofs is actually quite fun: it's challenging, interactive, and there's a clear goal. But gosh, does it take a lot of time, especially if, like me, you don't know what you're doing. There's also the periodic, galling experience, at the end of many hours of effort, where you realise that the goal that you're trying to prove is, in fact, false. The classic result here is the retrospective from the seL4 effort that found that, even though the project was large enough for the engineers to develop considerable experience, they spent about 10 times as much time proving as they did designing and imp

## Lazy Linearity for a Core Functional Language (POPL 2026)

DevFeed: [Lazy Linearity for a Core Functional Language (POPL 2026)](<https://devfeed.tech/articles/lazy-linearity-for-a-core-functional-language-popl-2026-27919.md>)

Original publisher: [Read original article](<http://alt-romes.github.io/posts/2025-11-26-lazy-linearity-popl26.html>)

Published: 2025-11-26T00:00:00Z

Content type: release

Language: en

Sources: [Romes' Musings](<https://devfeed.tech/sources/romes-musings.md>)

Topics: [Haskell](<https://devfeed.tech/topics/haskell.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>)

Tags: [2023](<https://devfeed.tech/tags/2023.md>), [2026](<https://devfeed.tech/tags/2026.md>), [abstract](<https://devfeed.tech/tags/abstract.md>), [arxiv](<https://devfeed.tech/tags/arxiv.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [core](<https://devfeed.tech/tags/core.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [functional](<https://devfeed.tech/tags/functional.md>), [ghc](<https://devfeed.tech/tags/ghc.md>), [haskell](<https://devfeed.tech/tags/haskell.md>), [language](<https://devfeed.tech/tags/language.md>), [languages](<https://devfeed.tech/tags/languages.md>), [lazy](<https://devfeed.tech/tags/lazy.md>), [linear](<https://devfeed.tech/tags/linear.md>), [optimisations](<https://devfeed.tech/tags/optimisations.md>), [paper](<https://devfeed.tech/tags/paper.md>), [pdf](<https://devfeed.tech/tags/pdf.md>), [program](<https://devfeed.tech/tags/program.md>), [proofs](<https://devfeed.tech/tags/proofs.md>), [research](<https://devfeed.tech/tags/research.md>)

### AI overview

The paper introduces Linear Core, a system that checks linear resource use according to lazy semantics. In Haskell's optimizing compiler, rewrites can break syntactic linearity even when a program's behavior preserves linear resource use, so traditional syntactic linear type systems can reject optimized Core programs. The authors prove Linear Core sound and show that multiple optimizing transformations preserve linearity in it while failing to do so in Core. They implemented it as a compiler plugin and tested it against linearity-heavy libraries, including linear-base. The excerpt does not detail the transformations or report evaluation results.

### Source excerpt

I'm very proud to announce that Lazy Linearity for a Core Functional Language, a paper by myself and Bernardo Toninho, will be published at POPL 26! [DOI, ACM]. The extended version of the paper, which includes all proofs, is available here [arXiv, PDF, DOI]. The short-ish story: In 2023, for my Master's thesis, I reached out to Arnaud Spiwack to discuss how Linear Types had been implemented in GHC. I wanted to research compiler optimisations made possible by linearity. Arnaud was quick to tell me: "Well yes, but you can't!" "Even though Haskell is linearly typed, Core isn't!"1 Linearity is ignored in Core because, as soon as it's optimised, previously valid linear programs become invalid. It turns out that traditional linear type systems are too syntactic, or strict, about understanding linearity - but Haskell, regardless of linear types, is lazily evaluated. Improving optimisations would have to wait. Our paper presents a system which, in contrast, also accepts programs that can only be understood as linear under non-strict evaluation. Including the vast majority of optimised linear Core programs (with proofs!). The key ideas of this paper were developed during my Master's, but it took a few more years of on-and-off work (supported by my employer Well-Typed) with Bernardo to crystalize the understanding of a "lazy linearity" and strengthen the theoretical results. Now, the proof of the pudding is in the eating. Go read it! Abstract Traditionally, in linearly typed languages, consuming a linear resource is synonymous with its syntactic occurrence in the program. However, under the lens of non-strict evaluation, linearity can be further understood semantically, where a syntactic occurrence of a resource does not necessarily entail using that resource when the program is executed. While this distinction has been largely unexplored, it turns out to be inescapable in Haskell's optimising compiler, which heavily rewrites the source program in ways that break syntactic l

## Automating Exhaustive Branch Coverage for Sealed Types in Kotlin

DevFeed: [Automating Exhaustive Branch Coverage for Sealed Types in Kotlin](<https://devfeed.tech/articles/automating-exhaustive-branch-coverage-for-sealed-types-in-kotlin-20458.md>)

Original publisher: [Read original article](<https://eng.wealthfront.com/2025/11/20/sealed-tests/>)

Author: Sean Amos

Published: 2025-11-20T16:33:33Z

Content type: article

Language: en

Sources: [Wealthfront](<https://devfeed.tech/sources/wealthfront.md>)

Topics: [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [sealed interface](<https://devfeed.tech/topics/sealed-interface.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [exhaustive matching](<https://devfeed.tech/topics/exhaustive-matching.md>), [Code quality](<https://devfeed.tech/topics/code-quality.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [automation](<https://devfeed.tech/tags/automation.md>), [code-quality](<https://devfeed.tech/tags/code-quality.md>), [code-review](<https://devfeed.tech/tags/code-review.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [exhaustive](<https://devfeed.tech/tags/exhaustive.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [junit](<https://devfeed.tech/tags/junit.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [parameterized-tests](<https://devfeed.tech/tags/parameterized-tests.md>), [runner](<https://devfeed.tech/tags/runner.md>), [sealed-classes](<https://devfeed.tech/tags/sealed-classes.md>), [test-coverage](<https://devfeed.tech/tags/test-coverage.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>), [wealthfront-engineering](<https://devfeed.tech/tags/wealthfront-engineering.md>)

### AI overview

Kotlin's sealed types let the compiler enforce exhaustive handling in `when` expressions, but JUnit does not ensure that unit tests cover every subtype passed to a function. Parameterized tests still depend on authors to supply the cases, and code review can miss omissions. The excerpt introduces a custom "Exhaustive Test Runner" intended to ensure at least one test case for each subclass of a sealed type, including subtypes added later. The supplied text ends as the article begins describing how to build it, so it does not establish the runner's implementation or usage details.

### Source excerpt

We take code correctness and code quality seriously at Wealthfront. One of the most effective ways we ensure that our code is correct is through rigorous unit testing and strong typing. In Kotlin, sealed classes and sealed interfaces offer a powerful tool to model restricted class hierarchies. They provide strong guarantees about the types in... Read more

## Types and Validators: A Convex Cookbook

DevFeed: [Types and Validators: A Convex Cookbook](<https://devfeed.tech/articles/types-and-validators-a-convex-cookbook-81476.md>)

Original publisher: [Read original article](<https://stack.convex.dev/types-cookbook>)

Author: Stack

Published: 2025-02-15T01:53:00Z

Content type: tutorial

Language: en

Sources: [Stack](<https://devfeed.tech/sources/stack.md>)

Topics: [Data validation](<https://devfeed.tech/topics/data-validation.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [Boilerplate](<https://devfeed.tech/topics/boilerplate.md>)

Tags: [code-generation](<https://devfeed.tech/tags/code-generation.md>), [convex](<https://devfeed.tech/tags/convex.md>), [fundamentals](<https://devfeed.tech/tags/fundamentals.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [types](<https://devfeed.tech/tags/types.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

### AI overview

The tutorial explains how to reuse Convex schema validators and generated TypeScript types across backend functions and frontend components. It demonstrates exporting shared validators, inspecting schema fields, deriving types with Infer, and using Doc, Id, and WithoutSystemFields to reduce duplication and keep data definitions consistent.

### Source excerpt

It can be tough to wrangle types to behave how you want them to. Thankfully, Convex was designed to make the experience with types perfect. Learn why that's the case here.

## Function Types in Nix

DevFeed: [Function Types in Nix](<https://devfeed.tech/articles/function-types-in-nix-32422.md>)

Original publisher: [Read original article](<https://garnix.io/blog/typed-function-types>)

Author: Aug

Published: 2024-08-27T00:00:00Z

Content type: article

Language: en

Sources: [Garnix Blog](<https://devfeed.tech/sources/garnix-blog.md>)

Topics: [Nix](<https://devfeed.tech/topics/nix.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [function](<https://devfeed.tech/topics/function.md>)

Tags: [ast](<https://devfeed.tech/tags/ast.md>), [boolean](<https://devfeed.tech/tags/boolean.md>), [branch](<https://devfeed.tech/tags/branch.md>), [code](<https://devfeed.tech/tags/code.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [control](<https://devfeed.tech/tags/control.md>), [copy](<https://devfeed.tech/tags/copy.md>), [custom](<https://devfeed.tech/tags/custom.md>), [data](<https://devfeed.tech/tags/data.md>), [deployments](<https://devfeed.tech/tags/deployments.md>), [dev](<https://devfeed.tech/tags/dev.md>), [existing](<https://devfeed.tech/tags/existing.md>), [function](<https://devfeed.tech/tags/function.md>), [functions](<https://devfeed.tech/tags/functions.md>), [history](<https://devfeed.tech/tags/history.md>), [hosting](<https://devfeed.tech/tags/hosting.md>), [infrastructure-as-code](<https://devfeed.tech/tags/infrastructure-as-code.md>), [invariant](<https://devfeed.tech/tags/invariant.md>), [nix](<https://devfeed.tech/tags/nix.md>), [types](<https://devfeed.tech/tags/types.md>)

### AI overview

Nix's module system can validate configuration shapes, but it normally checks only that a value is a function, not that the function's inputs and outputs preserve a desired invariant. The post shows how to enforce one for deployment persistence: expose controlled constructors such as `merge`, `ifBranchIs`, and `continueOrCreate` that build tagged syntax-tree nodes instead of ordinary records. Apply the user function to a single tagged representation of prior state, then recursively check the resulting tree; branch alternatives must infer the same set of persistence names. A separate interpreter can turn a valid tree into persistence records for a given branch and prior state. The approach supports only arguments whose operations can be controlled and analyzed; arbitrary types such as `Int` do not work directly, though a controlled type built from integers may. The excerpt also connects the technique to defunctionalization and HOAS and notes possible use in transpilation.

### Source excerpt

A short note about custom typing for functions in Nix

## Sealed Types

DevFeed: [Sealed Types](<https://devfeed.tech/articles/sealed-types-25064.md>)

Original publisher: [Read original article](<https://typealias.com/start/kotlin-sealed-types/>)

Author: author@typealias.com (Dave Leeds)

Published: 2024-01-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [sealed interface](<https://devfeed.tech/topics/sealed-interface.md>), [interface](<https://devfeed.tech/topics/interface.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [enum](<https://devfeed.tech/topics/enum.md>)

Tags: [classes](<https://devfeed.tech/tags/classes.md>), [enum](<https://devfeed.tech/tags/enum.md>), [enum-class](<https://devfeed.tech/tags/enum-class.md>), [exhaustive](<https://devfeed.tech/tags/exhaustive.md>), [exhaustive-matching](<https://devfeed.tech/tags/exhaustive-matching.md>), [ice-cubes](<https://devfeed.tech/tags/ice-cubes.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [learn-to-program](<https://devfeed.tech/tags/learn-to-program.md>), [programming](<https://devfeed.tech/tags/programming.md>), [sealed](<https://devfeed.tech/tags/sealed.md>), [sealed-class](<https://devfeed.tech/tags/sealed-class.md>), [sealed-interface](<https://devfeed.tech/tags/sealed-interface.md>), [subtype](<https://devfeed.tech/tags/subtype.md>), [types](<https://devfeed.tech/tags/types.md>), [when-conditional](<https://devfeed.tech/tags/when-conditional.md>)

### AI overview

Sealed interfaces and classes let Kotlin limit the possible types in a hierarchy, much as enum classes limit possible values, so Kotlin can check that a when expression accounts for every case. The excerpt introduces Cecil's Ice Shop, where customers request orders or refunds and the owner models the operation in Kotlin; it notes that package sizes are initially represented by an enum class, but does not show the sealed-type implementation.

### Source excerpt

In Chapter 5, we saw how limiting our options can be a good thing. In that chapter, we used enum classes to limit our values, which allows Kotlin to ensure that we account for all possibilities in a when expression. We can get a similar benefit for our types by using sealed interfaces and classes. In this chapter, we'll visit Cecil's Ice Shop to learn all about sealed types. Let's get started!

## Generics Part 02: Underlying Types

DevFeed: [Generics Part 02: Underlying Types](<https://devfeed.tech/articles/generics-part-02-underlying-types-22168.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2020/08/generics-02-underlying-types.html>)

Published: 2020-08-18T00:00:00Z

Content type: article

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [Type Parameter](<https://devfeed.tech/topics/type-parameter.md>), [data type](<https://devfeed.tech/topics/data-type.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [function](<https://devfeed.tech/tags/function.md>), [generics](<https://devfeed.tech/tags/generics.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [programming](<https://devfeed.tech/tags/programming.md>), [string](<https://devfeed.tech/tags/string.md>), [types](<https://devfeed.tech/tags/types.md>), [vector](<https://devfeed.tech/tags/vector.md>)

### AI overview

The post introduces Go's proposed generics syntax through a type whose underlying representation is a slice. It compares separate concrete vector types for integers and strings, each with a method that returns the highest-index value; when a vector is empty, the method returns the element type's zero value and an error. The excerpt explains the integer example's use and begins describing validation in the string example, but it cuts off before showing how the generic version is declared or evaluated.

### Source excerpt

Changes The draft is a living document which means these posts will need to change over time. This section documents when changes have taken place to this post. 21/08/20 : Moving forward with the generics design draft Series Index Generics Part 01: Basic Syntax Generics Part 02: Underlying Types Generics Part 03: Struct Types and Data Semantics Introduction In the previous post, I showed you how to write a generic function in Go using the proposed syntax from the generics draft document. I did this through the progression of writing different versions of the same function using concrete types, the empty interface, and then finally generics. I also provided information on why the new syntax was needed and how the compiler can simplify the calling of generic functions by inferring type information at the call site.

## Variables, Expressions, and Types

DevFeed: [Variables, Expressions, and Types](<https://devfeed.tech/articles/variables-expressions-and-types-25065.md>)

Original publisher: [Read original article](<https://typealias.com/start/kotlin-variables-expressions-types/>)

Author: author@typealias.com (Dave Leeds)

Published: 2020-03-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [identifier](<https://devfeed.tech/topics/identifier.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>)

Tags: [developer](<https://devfeed.tech/tags/developer.md>), [expression](<https://devfeed.tech/tags/expression.md>), [fundamentals](<https://devfeed.tech/tags/fundamentals.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [learn-to-program](<https://devfeed.tech/tags/learn-to-program.md>), [programming](<https://devfeed.tech/tags/programming.md>), [statement](<https://devfeed.tech/tags/statement.md>), [types](<https://devfeed.tech/tags/types.md>), [val](<https://devfeed.tech/tags/val.md>), [var](<https://devfeed.tech/tags/var.md>), [variable](<https://devfeed.tech/tags/variable.md>), [variables](<https://devfeed.tech/tags/variables.md>)

### AI overview

The excerpt introduces Kotlin variables as named holders for values, using a circle's radius in the circumference formula as an analogy: the radius can vary, and a variable can hold a number or other things. It frames variables, expressions, and types as the first chapter's fundamentals, but ends before giving the promised Kotlin code example.

### Source excerpt

So you want to be a Kotlin developer? You've come to the right place! This book will take you through the fundamentals of Kotlin, gently introducing you to the most important concepts of the language in order to help you become a proficient Kotlin developer. Even if you're a seasoned professional, it's important to know the fundamentals in order to establish a solid foundation of understanding so that you can be as effective as possible.

## Artisanal Objective-C Sum Types

DevFeed: [Artisanal Objective-C Sum Types](<https://devfeed.tech/articles/artisanal-objective-c-sum-types-20448.md>)

Original publisher: [Read original article](<https://medium.com/twitch-news/artisanal-objective-c-sum-types-8ea1ab9da342?source=rss----3ae745429979--engineering>)

Author: Heath Borders

Published: 2018-05-14T18:49:35Z

Content type: tutorial

Language: en

Sources: [Twitch](<https://devfeed.tech/sources/twitch.md>)

Topics: [union types](<https://devfeed.tech/topics/union-types.md>), [Objective-C](<https://devfeed.tech/topics/objective-c.md>), [enum](<https://devfeed.tech/topics/enum.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [data type](<https://devfeed.tech/topics/data-type.md>), [Boilerplate](<https://devfeed.tech/topics/boilerplate.md>)

Tags: [arc](<https://devfeed.tech/tags/arc.md>), [block](<https://devfeed.tech/tags/block.md>), [boilerplate](<https://devfeed.tech/tags/boilerplate.md>), [c](<https://devfeed.tech/tags/c.md>), [callback](<https://devfeed.tech/tags/callback.md>), [class](<https://devfeed.tech/tags/class.md>), [combines](<https://devfeed.tech/tags/combines.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [enum](<https://devfeed.tech/tags/enum.md>), [error](<https://devfeed.tech/tags/error.md>), [generator](<https://devfeed.tech/tags/generator.md>), [generic](<https://devfeed.tech/tags/generic.md>), [generics](<https://devfeed.tech/tags/generics.md>), [implement](<https://devfeed.tech/tags/implement.md>), [interface](<https://devfeed.tech/tags/interface.md>), [ios](<https://devfeed.tech/tags/ios.md>), [objective-c](<https://devfeed.tech/tags/objective-c.md>), [structs](<https://devfeed.tech/tags/structs.md>), [swift](<https://devfeed.tech/tags/swift.md>), [twitch](<https://devfeed.tech/tags/twitch.md>), [types](<https://devfeed.tech/tags/types.md>), [union](<https://devfeed.tech/tags/union.md>), [value](<https://devfeed.tech/tags/value.md>)

### AI overview

Swift enums provide concise, compiler-checked sum types; a C union paired with an enum can represent them but does not prevent mismatched values. Because ARC does not allow Objective-C objects in unions, the article builds a class-based alternative: a base class and subclasses represent the variants, and a block-based `switchFoo:bar:` callback dispatches each variant. Unavailable initializers discourage direct construction, while `NS_REQUIRES_SUPER` helps flag subclasses that fail to call the base method if its signature changes. A separate generic `Switcher` class captures a return type at each call site, avoiding missed local assignments; the excerpt says this still leaves a single place where an assignment can be missed. The approach provides type checking for construction, processing, and unpacking, but requires substantial mechanical boilerplate; the author suggests generating the code. The supplied text is an excerpt.

### Source excerpt

A sum type combines many possible differently-typed values into a single value, expressed in Swift as an enum. https://medium.com/media/6217cfe231386e04ce2e7228080fae7a/href In C, we can achieve the power of Swift's enum with a combination of a C union and a C enum: https://medium.com/media/3f1696d38fcec2600a942ffbe03c8cd4/href First, I'm sure you notice Swift's enum is more concise, but it's also safer. In C, the compiler doesn't prevent us from either creating an example with a mismatched type or from consuming a union as a mismatched type: https://medium.com/media/82f0586deab20a07abc615a9e459028e/href Trying to mismatch our enum types in Swift won't compile. Yay! https://medium.com/media/03d37cc33364b48d851beb4ccf38a97d/href Unfortunately, in Objective-C, we can't use Objective-C objects in structs or unions in ARC, so we can't use our C sum type with Objective-C objects. However, we can build a similar construct by hand. First, we need a class to capture all of the distinct types, and expose them through a single block-based callback interface: https://medium.com/media/78216b190ad6501c26ad89d0864b1c5c/href We must declare forward references for our distinct types, which we'll define later. We mark new and init as NS_UNAVAILABLE so that consumers won't be able to instantiate our base class directly. If they use -Wobjc-designated-initializers, they won't be able to subclass our base class either (without importing ExamplePrivate.h, which we won't distribute to them). Next, we'll declare our distinct types: https://medium.com/media/329743de725ccd196c3f535306714cf9/hrefhttps://medium.com/media/1785598f614b3963a0a39ec81d8c5dac/href They're simply plain-old-objective-c-objects that extend our base class. Our base class and our distinct types all have switchFoo:bar:. The distinct types will simply call the respective callback block with self. The base class will have an empty implementation. We use NS_REQUIRES_SUPER on switchFoo:bar: because if we add another distinct

## Literature review on the benefits of static types

DevFeed: [Literature review on the benefits of static types](<https://devfeed.tech/articles/literature-review-on-the-benefits-of-static-types-77687.md>)

Original publisher: [Read original article](<https://danluu.com/empirical-pl/>)

Published: 2014-11-07T00:00:00Z

Content type: article

Language: en

Sources: [Danluu](<https://devfeed.tech/sources/danluu.md>)

Topics: [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [Static code analysis](<https://devfeed.tech/topics/static-code-analysis.md>), [Haskell](<https://devfeed.tech/topics/haskell.md>), [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>)

Tags: [code-quality](<https://devfeed.tech/tags/code-quality.md>), [features](<https://devfeed.tech/tags/features.md>), [regression](<https://devfeed.tech/tags/regression.md>), [type-safety](<https://devfeed.tech/tags/type-safety.md>)

### AI overview

This review surveys empirical studies of static and dynamic typing, programming language effects on software quality, developer productivity, and related questions. It finds that most reported effects are small or uncertain, and argues that study limitations--including small or unrealistic tasks, participant differences, and weak causal evidence--make broad claims difficult to support.

### Source excerpt

There are some pretty strong statements about types floating around out there. The claims range from the oft-repeated phrase that when you get the types to line up, everything just works, to "not relying on type safety is unethical (if you have an SLA)"1, "It boils down to cost vs benefit, actual studies, and mathematical axioms, not aesthetics or feelings", and I think programmers who doubt that type systems help are basically the tech equivalent of an anti-vaxxer. The first and last of these statements are from "types" thought leaders who are widely quoted. There are probably plenty of strong claims about dynamic languages that I'd be skeptical of if I heard them, but I'm not in the right communities to hear the stronger claims about dynamically typed languages. Either way, it's rare to see people cite actual evidence. Let's take a look at the empirical evidence that backs up these claims. Click here if you just want to see the summary without having to wade through all the studies. The summary of the summary is that most studies find very small effects, if any. However, the studies probably don't cover contexts you're actually interested in. If you want the gory details, here's each study, with its abstract, and a short blurb about the study. A Large Scale Study of Programming Languages and Code Quality in Github; Ray, B; Posnett, D; Filkov, V; Devanbu, P Abstract What is the effect of programming languages on software quality? This question has been a topic of much debate for a very long time. In this study, we gather a very large data set from GitHub (729 projects, 80 Million SLOC, 29,000 authors, 1.5 million commits, in 17 languages) in an attempt to shed some empirical light on this question. This reasonably large sample size allows us to use a mixed-methods approach, combining multiple regression modeling with visualization and text analytics, to study the effect of language features such as static v.s. dynamic typing, strong v.s. weak typing on software qua

## StronglyTyped: A library for strongly typed properties & constants in JavaScript

DevFeed: [StronglyTyped: A library for strongly typed properties & constants in JavaScript](<https://devfeed.tech/articles/stronglytyped-a-library-for-strongly-typed-properties-constants-in-javascript-52002.md>)

Original publisher: [Read original article](<https://lea.verou.me/2011/05/strongly-typed-javascript/>)

Author: Lea Verou

Published: 2011-05-05T00:00:00Z

Content type: article

Language: en

Sources: [Lea Verou's blog](<https://devfeed.tech/sources/lea-verou-s-blog.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Programming Language Type Systems](<https://devfeed.tech/topics/programming-language-type-systems.md>), [Script](<https://devfeed.tech/topics/script.md>), [java vs javascript](<https://devfeed.tech/topics/java-vs-javascript.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [browser-support](<https://devfeed.tech/tags/browser-support.md>), [es](<https://devfeed.tech/tags/es.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [js](<https://devfeed.tech/tags/js.md>), [original](<https://devfeed.tech/tags/original.md>), [properties](<https://devfeed.tech/tags/properties.md>), [releases](<https://devfeed.tech/tags/releases.md>), [type](<https://devfeed.tech/tags/type.md>), [type-checking](<https://devfeed.tech/tags/type-checking.md>), [types](<https://devfeed.tech/tags/types.md>)

### AI overview

StronglyTyped adds runtime type checks and constants to JavaScript properties using ES5 getters and setters. Its typed-property methods reject values of the wrong type with a TypeError; supported types include Array, Boolean, Date, Function, Integer, Number, RegExp, and String. Null and undefined are accepted for every type, while NaN and Infinity are accepted for Number and Integer. The generic property method supports other native or global-object types. Constants become read-only only after receiving a non-undefined value. Browsers without getter/setter support fall back to ordinary loosely typed properties. The text also says the library provides cross-browser bind and forEach methods and describes browser compatibility as verified only in a subset of the listed supported browsers.

### Source excerpt

I'll start by saying I love the loosely typed nature of JavaScript. When I had to work with strongly typed languages like Java, it always seemed like an unnecessary hassle. On the contrary, my boyfriend even though very proficient with HTML, CSS and SVG, comes from a strong Java background and hates loosely typed scripting languages. So, to tempt him into JS and keep him away from heavy abstractions like Objective-J, I wrote a little library that allows you to specify strongly typed properties (and since global variables are also properties of the window object, those as well) of various types (real JS types like Boolean, Number, String etc or even made up ones like Integer) and constants (final properties in Java). It uses ES5 getters and setters to do that and falls back to regular, loosely typed properties in non-supporting browsers. Also, as a bonus, you get cross-browser Function.prototype.bind and Array.prototype.forEach and a robust type checking function: StronglyTyped.is(type, value). Example: Strongly typed properties You define strongly typed properties by using the corresponding methods of the StronglyTyped object. For example, the following snippet defines a boolean property called "foo" on an object literal: var o = {}; StronglyTyped.boolean(o, 'foo', true); console.log(o.foo); // prints true o.foo = false; console.log(o.foo); // prints false o.foo = 'bar'; // TypeError: foo must be of type Boolean. bar is not. Example: Constants You define constants by using the constant method of the StronglyTyped object. For example, the following snippet defines a global MAGIC_NUMBER constant: var o = {}; StronglyTyped.constant(window, 'MAGIC_NUMBER', 3.1415926535); console.log(MAGIC_NUMBER); // prints 3.1415926535 MAGIC_NUMBER = 4; console.log(MAGIC_NUMBER); // prints 3.1415926535 Please note that constants only become read-only after they first get a non-undefined value. For example: StronglyTyped.constant(window, 'MAGIC_NUMBER'); console.log(MAGIC_NUMBER); // pr