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”

Day 24: The Grinch of Raku, Part 2: Hold Your Horses

In 2017, the Grinch ruined Christmas by showing off some of the naughty things you can do with Raku’s features. Unfortunately, while his heart grew by three sizes that year, there’s more than one Grinch! This Grinch will be doing something extra naughty this year, taking some inspiration from the JavaScript community. You may haveContinue reading “Day 24: The Grinch of Raku, Part 2: Hold Your Horses”

Day 14 – Thinking Beyond Types: an Introduction to Rakudo’s MOP

It’s Christmas season! Christmas would not be Christmas without the caroling that’s part of the festivities, so let’s make it possible to sing some. We could simply make a carol one giant string, but that’s not good enough. Being a song, carols often have a chorus that’s repeated in between verses. If we were toContinue reading “Day 14 – Thinking Beyond Types: an Introduction to Rakudo’s MOP”