Skip to content

Define an interface for Codefmt#1

Merged
panglesd merged 3 commits intopanglesd:format-long-signature-with-formatfrom
Julow:782_codefmt_imp
Nov 23, 2021
Merged

Define an interface for Codefmt#1
panglesd merged 3 commits intopanglesd:format-long-signature-with-formatfrom
Julow:782_codefmt_imp

Conversation

@Julow
Copy link
Copy Markdown
Collaborator

@Julow Julow commented Nov 22, 2021

The interface is defined in such a way that the "generating" (Generator) code and the "rendering" (Codefmt.render) code don't call each other. The use of Format is entirely abstracted, making the interface a lot easier to use.
This allows, for example, to add a "state" argument to Codefmt.t (I tried something here but it didn't end well)

with an abstract type t. Will be useful for the following changes.
The generator is no longer aware that Codefmt is implemented using
closures. Generator code can no longer execute in during rendering.
@panglesd
Copy link
Copy Markdown
Owner

Looks better indeed. Thanks!

@panglesd panglesd merged commit 87397ef into panglesd:format-long-signature-with-format Nov 23, 2021
panglesd pushed a commit that referenced this pull request Jul 29, 2024
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

Successfully merging this pull request may close these issues.

2 participants