Day 19: Typed Raku, Part 2: Taming Behaviour

In the previous part, I claimed that types can allow for more fluid, robust code, then wrote a bunch of restrictive types for chess that won’t allow for this to occur: Branching with Multiple Dispatch There’s a key concept we need to understand before we can fix the types we wrote, but we can’t useContinue reading “Day 19: Typed Raku, Part 2: Taming Behaviour”

Day 18: Typed Raku, Part 1: Taming State

Introspecting Types and Kinds The type of any object in Raku can be introspected with WHAT: Though we’re often more interested in its type’s name than the type object itself when we want to do this: Typechecking is among the behaviours defined by an object’s HOW: In type theory jargon, this would be a kind,Continue reading “Day 18: Typed Raku, Part 1: Taming State”