This article presents a way to implement a Finite-State Machine with the PHP Type System. The goal is to simply avoid impossible states and transitions.
Tag: type
Expressing high level optimisations within LLVM
https://www.youtube.com/watch?v=sKIRIilZDnE At Azul we are building a production quality, state of the art LLVM based JIT compiler for Java. Originally targeted for C and C++, the LLVM IR is a rather low-level representation, which makes it challenging to represent and utilize high level Java semantics in the optimizer. One of the approaches is to perform … Continue reading Expressing high level optimisations within LLVM
Subtyping in Rust and Clarke’s Third Law
https://www.youtube.com/watch?v=fI4RG_uq-WU& “Any sufficiently advanced technology is indistinguishable from magic.” – Arthur C Clarke This is a talk about magic. In particular: Rust has subtyping, but it may not be in the place where you thought it was. My primary goal is to explain that metaphorical sleight-of-hand, in two parts. My secondary goal is to … Continue reading Subtyping in Rust and Clarke’s Third Law
Using Generics Effectively
https://www.youtube.com/watch?v=erJdCIti_O8 RustConf 2016: Traits and type parameters are the core mechanism for abstraction in Rust. Other languages also have features like these, but few leverage them nearly as much as Rust does. This talk will describe the many powerful uses for Rust's generics system, how generics can be used as a replacement for tools like … Continue reading Using Generics Effectively