Hacker News new | ask | show | jobs
by davexunit 4146 days ago
>It would be in violation with basic ruby syntax.

But this isn't about regular Ruby syntax, this is about extending Ruby syntax by embedding new languages within it. A new language may have new evaluation rules. As another user points out, there's a syntax called 'alias' that works similarly to my example, so I disagree that it would be violating anything.

>I'm glad ruby does not allow whatever it is that you're asking for.

I'm essentially asking for macros commonly found in the Lisp family of languages.

1 comments

there's a syntax called 'alias' that works similarly to my example

That's an unfortunate wart on the language (an inconsistency) and not related to your example at all.

I'm essentially asking for macros commonly found in the Lisp family of languages.

Can you come up with a real-world use case for that?