Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is holding this back? #2

Open
BebeSparkelSparkel opened this issue Apr 6, 2024 · 5 comments
Open

What is holding this back? #2

BebeSparkelSparkel opened this issue Apr 6, 2024 · 5 comments

Comments

@BebeSparkelSparkel
Copy link

Thanks for the reference.

Seems like there is a fair amount of interest in this area but no implementation has had any traction.

What in your opinion is holding bidirectional programming, specifically parsing and printing, from being usable?

@kztk-m
Copy link
Owner

kztk-m commented Apr 7, 2024

It's hard to answer. General issues would include the lack of many examples, practicality, and maturity. But they may only be addressed by long-term, continuous development.

Regarding practicality, I personally think some existing approaches, including ours, have (certain) potential, but at least I haven't made enough effort to make this potential evident to users.

Being more technical, parsing/printing is not that symmetric due to control over prettiness (of printing) and lexers. So, to make the system practical, we need to address these things to some extent by certain means. Also, if we want to use some parsing methods that can handle left recursions, we may need to make recursive definitions explicit so that the system can handle them, which would introduce another issue. Haskell does not allow us to change the meaning of recursive definitions, except for value recursions for monads (mfix).

@BebeSparkelSparkel
Copy link
Author

Are you using flippre regularly?

For asymmetry of printing I have added Reader and State to the printer monad and ensure that the parser can handle all the variations.

@kztk-m
Copy link
Owner

kztk-m commented Apr 11, 2024

Are you using flippre regularly?

To be honest, no. One reason is that there is not so much opportunity to write parsers/printers, especially because I recently focused on embedded DSLs.

For asymmetry of printing I have added Reader and State to the printer monad and ensure that the parser can handle all the variations.

Sounds interesting. Where can I find out in the repo how these monads are used in printing?

@BebeSparkelSparkel
Copy link
Author

BebeSparkelSparkel commented Apr 12, 2024

@kztk-m
Copy link
Owner

kztk-m commented Apr 30, 2024

Thank you. I will take a look. Sorry for the late reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants