3 ms·
Amazing, 46 comments, all about my choosing to use the correct symbol for the macro. It's not like I choose some super misleading Unicode characters, like for e
by nixpulvis 7y ago
Amazing, 46 comments, all about my choosing to use the correct symbol for the macro. It's not like I choose some super misleading Unicode characters, like for example, how macOS smart quotes might change "foo" into “foo”.
Again, technically correct... maybe programming languages should match these kinds of quotes too.
But this is all more or less beside the point. I can type `λ!{x.x}` easily, since I have a Greek keyboard on my system (and a λ on my wrist, and a cat named π).
It's even more of a small deal as I've included the equivalent `abs!{x.e}` and `app!(e1,e2)` macros. In fact `λ!` and `γ!` are just macro "aliases".
Also, given the prominence of α-renaming, β-reduction, and η-reduction, I'm very glad I can use these symbols in Rust.
- deleted 7y ago[deleted]
- rbonvall 7y agoI agree, it's nice to use the same symbols you'd use on paper. I did something similar in Scala http://mez.cl/en/lambda-dsl/ http://mez.cl/en/lambda-dsl/
- nixpulvis 7y agoVery cool! I think you've inspired me to implement something like `Expression << Expression` much like your `$`. I'm currently trying to determine the best way to implement `From<Expression> for u64` (or maybe `Option<u64>`...), so I can convert both to and from `u64` types as church encoded numerals. Eventually the goal is to `impl Into/From<Expression>` for all the types one might use, giving a horribly inefficient runtime for Rust ;)
- nixpulvis 7y agoP.S. DrRacket (https://racket-lang.org/ https://racket-lang.org/) let's you insert a `λ` with Ctrl+\.