Carl Mäsak

Results 649 comments of Carl Mäsak

Here's a mouth-watering implementation of rock-paper-scissors: ``` import syntax.stmt.repeat; import syntax.op.conditional; enum Choice { rock, paper, scissors } func infix:(p1, p2) { false } func infix:(Choice.rock, Choice.scissors) { true }...

Oh, and perhaps most importantly: * The `Choice.rock` in the signature is short for `_: Choice == Choice.rock`, an "equality test". This is directly from Dylan. Equality tests count as...

Another thing: I wrote `func` without much hesitation, but these are now actually called "methods", at least with Dylan/CLOS terminology. I find it hard to decide between keeping `func` as-is...

Heh. Also known as "[extension methods](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods) for everything". 😛

_Implicit protos_ are generated behind the scenes whenever there's a new method in a scope without an explicit proto. The implicit proto is "partially transparent", it contains the appropriate methods...

Define a _longname_ to be the combination of the method's lexical name and its signature (excluding, I think, its return type). Perl 6 makes this distinction too. Methods with the...

@vendethiel Yes, although the tedium here seems to consist only of _remembering_ to attach position information from a `Match` to a `Q`. More precisely, we can't _mandate_ it (because synthetic...

> ## `delete exists` > [...] > > In other words, `delete` knows how to work with `exists` in order to both do its own deletion and return upwards the...

## Functions I've written "Functions (units of functionality)" in my notes. I'll have "units of <noun>" written down for each of the rungs on the abstraction ladder, but I realize...

## Coroutines Known under many names: fibers, green threads. (The term "green threads" comes from the fact that some part of Java implementation was called "Green" at some point.) I've...