|
|
|
|
|
by zozbot234
874 days ago
|
|
> Another terrible thing is people would code up DSL's using operator overloading, such as a Regex language. There's nothing wrong with this if your language has proper hygienic macros. Then you can have all of math_expr![ … ], float_expr![ … ] (dangerous! order of operations may affect results), regex_expr![ … ], or even stream_concat_expr![ … ] all using the same operators while meaning completely different things and preserving complete extensibility. They would even be composable since each macro invocation would desugar its own operators and leave those in other contained macros unaltered. |
|