Is it possible to implemet a Ruby-like internal 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.
精彩评论