Hacker News new | ask | show | jobs
by youdontknowtho 2359 days ago
Isn't this what rustlang did?

I have to admit that I'm coming around on rust. I still think that their fanboy marketing is obnoxious...but I need to get over my penchant for finding reasons to be angry.

2 comments

We have two forms of macros: one that’s basically fancy pattern matching, and another that lets you manipulate an arbitrary series of tokens.
I think they have a variety of different kinds of them. I'm not sure I want to go there. There are already benefits to be had by something that looks basically like function-like macros in C, but where the replacement bodies are required to be valid expressions, and that is scoped like other functions and variables, and only expanded after parsing. I did that for my own (experimental) language and it was very easy to implement and use.