On Wed, Jun 12, 2019 at 10:10 AM Greg Ewing firstname.lastname@example.org wrote:
Yanghao Hua wrote:
You are absolutely right in that writing a new parser might not be a bad idea, but it is just soooo close for enabling Python to be used as the DSL language.
You seem to be arguing for this as an enabler for using Python for DSLs in general, but you're really only talking about one particular DSL, i.e. your HDL.
Do you have any evidence that this a single missing piece that will be of great benefit to other DSLs? Or will the next person who wants a DSL be asking for yet another piece of new syntax to support their particular application, etc?
I believe the "<==" operator has more use than just for HDL design (e.g. for replacing descriptors as described earlier ... but it also has its cons, e.g. it is no longer transparent for the normal assignment "="). This might help other DSLs but definitely not making Python feature complete for all DSLs. Just like @ operator pushed into Python, once there are proven use cases, I believe Python will keep adding more? This feels painful but ... what can we do? Waiting more operators to come or try to allow users to define new operators in python itself?