开发者

Is it possible to implemet a Ruby-like internal DSL in Python?

开发者 https://www.devze.com 2023-01-27 00:55 出处:网络
Is it possible to implement an internal DSL in a language without macros?Has anyone succeeded in implementing a Ruby-like inter开发者_如何学Gonal DSL in python?

Is it possible to implement an internal DSL in a language without macros? Has anyone succeeded in implementing a Ruby-like inter开发者_如何学Gonal DSL in python?

I am trying to develop a simple state machine with a more intuitive syntax like:

start -> Event -> Next ->Action 


I am having a bit of trouble grokking your question.

AFAIU, you are asking

Can you implement a Ruby-like internal DSL in a language without macros?

And the answer to that is obviously "Yes", since Ruby doesn't have macros.

0

精彩评论

暂无评论...
验证码 换一张
取 消