Tag
The author shares a Rust programming technique to improve type safety by creating individual types for each variant of an enum, specifically for path components, based on std::path::Component.
The article discusses how Rust can simulate named arguments using its type system with structs, offering an ergonomic alternative without new language features.
The article examines the complexities of aliasing in type systems for programming languages, using Futhark's in-place updates as an example, and warns about the design challenges it can introduce.
In the next release of ty, full support for recursive implicit type aliases is implemented using mu types.
Rust has stabilized its 'never' type after over two years of development, a feature that enables more efficient generic code and simplifies type inference in the language.
The article discusses the recent addition of the empty type in Rust, explaining the difference between empty and bottom types and how it affects type coercion in the language.
This article argues that Runtime Type Information (RTTI) has a linear cost, while Compile-Time Type Information (CTTI) can lead to exponential costs in compilation time and binary size, challenging the assumption that CTTI is zero-cost.
After over a decade of instability and failed attempts, the never type in Rust has been stabilized on nightly releases, marking a significant development for the programming language.
The Rust blog announces the enablement of the next-generation trait solver on nightly, a major compiler update that replaces core type system components, fixes over 200 issues, and is planned for stabilization.
The article argues that assembly is actually typed and presents Odin's inline assembler as the best implementation due to its deep integration with the language's type system and semantic diagnostics.
The article explores unexpected behavior in Common Lisp's SBCL where array sub-typing works for integer types but fails for constrained types like (unsigned-byte 16), attributed to compiler optimizations and upgraded array element types.
This article explains how to use Dart's final class with private constructors to create proof types that enforce validation at compile time, ensuring that certain computations have been performed before values are used.
By treating types as positive spaces for constructing new values rather than negative spaces for restricting values, and combining product types and sum types, we can precisely model data invariants and avoid fighting with the type checker. It recommends using simple type composition rather than complex type system features.
Temper is a programming language that cross-translates to multiple target languages including C#, Java, JavaScript/TypeScript, Lua, and Python, enabling shared libraries across ecosystems.
A blog post from Inngest detailing how adding a second middleware corrupts TypeScript types due to a loophole in type constraint checking, and explaining the root cause involving optional properties and conditional types.
A tutorial on type inference covering the Damas-Hindley-Milner type system, unification, and related concepts, with OCaml code examples.
The article explains how the author taught Rust's type system to reject parallel reducer pipelines that could cause data races, using a type-level disjointness technique in the ruxe library.
An experiment on using Rust's type system as an AI coding specification, distilling practices from Epic Lora.
A Lisp interpreter embedded in Rust's trait system, allowing recursive functions, closures, and continuation passing style at compile time.
This blog post introduces 'only bounds', a proposed improvement to Rust's generics system that replaces the current Sized/?Sized hierarchy with a richer set of sizedness traits to accommodate dynamically sized types and ARM's Scalable Vector Extension.