Eric Lippert's blog
116 followers 0 articles/week
Bean Machine Retrospective, part 9

I wanted to implement concise “pattern matching” in Python, a language which unlike C#, F#, Scala, and so on, does not have any pattern matching built in. Logically a pattern is just a predicate: a function which takes a value and returns true if the value “matches” the pattern, false otherwise. The code for this episode is here. When I embarked...

Tue Mar 21, 2023 23:34
Bean Machine Retrospective, part 9

I wanted to implement concise “pattern matching” in Python, a language which unlike C#, F#, Scala, and so on, does not have any pattern matching built in. Logically a pattern is just a predicate: a function which takes a value and returns true if the value “matches” the pattern, false otherwise. The code for this episode is here. When I embarked...

Tue Mar 21, 2023 20:34
Bean Machine Retrospective, part 8

Before getting into the details of how my combinator-inspired source code transformation system works, I should say first, what is a general overview of the system? and second, why did I build it at all? In my experience, a typical compiler’s AST rewriter does not use a combinator-based approach. Roslyn for example used the visitor pattern almost exclusively...

Fri Feb 24, 2023 03:30
Bean Machine Retrospective, part 8

Before getting into the details of how my combinator-inspired source code transformation system works, I should say first, what is a general overview of the system? and second, why did I build it at all? In my experience, a typical compiler’s AST rewriter does not use a combinator-based approach. Roslyn for example used the visitor pattern almost exclusively...

Thu Feb 23, 2023 22:54
Bean Machine Retrospective, part 7

How do we write a compiler in a typical general-purpose line-of-business OO programming language such as Python, C#, Java, and so on? Compilers are programs, so we could make the question more general: how do we write programs? The basic idea common to almost every widely used programming language is to use composition: Divide...

Wed Feb 8, 2023 23:17
Bean Machine Retrospective, part 7

How do we write a compiler in a typical general-purpose line-of-business OO programming language such as Python, C#, Java, and so on? Compilers are programs, so we could make the question more general: how do we write programs? The basic idea common to almost every widely used programming language is to use composition: Divide...

Wed Feb 8, 2023 20:18

Build your own newsfeed

Ready to give it a go?
Start a 14-day trial, no credit card required.

Create account