cmsc430 / www

CMSC 430 Design and Implementation of Programming Languages
https://www.cs.umd.edu/class/spring2024/cmsc430/
45 stars 33 forks source link

Rethink lambdas, datums, etc #120

Open dvanhorn opened 1 year ago

dvanhorn commented 1 year ago

Starting with Loot the compiler should either return multiple values or a more structured result than just an Asm sequence so that compilation can be a single pass. The code would be more efficient and clearer and eliminate the functions that scan over a program and produce certain subexpressions (e.g. lambdas, datums).

laelath commented 1 year ago

so I was thinking about it, and I don't think there's any reason why the body of the lambda can't be put inline with the lambda creation site, as long as the creation path jumps around it. I won't deny that this feels pretty ugly though.

laelath commented 1 year ago

demoed in https://github.com/laelath/cmsc430-www/tree/inline-cc