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

Decide what to do with Ack #99

Open
t-wallet opened this issue Jul 29, 2024 · 3 comments
Open

Decide what to do with Ack #99

t-wallet opened this issue Jul 29, 2024 · 3 comments

Comments

@t-wallet
Copy link
Collaborator

Similarly to #87, we need to make a decision on what to do with the Ack type. There are three options:

  1. Keep it as is.
  2. Change it to Data Ack (fwdType :: Type) = Ack Bool. This ensures that mismatched Bwd and Fwd channels are not connected on the type level.
  3. Remove it entirely and just make the Bwd of Df a Bool.

I'd like to hear your opinions on this!

@t-wallet
Copy link
Collaborator Author

My thoughts on this:

I'm not a big fan of Ack. You always deconstruct or coerce it to a boolean anyway, so the newtype provides little type safety for the extra layer of indirection. Its name can also be confusing to beginners, as acking NoData is perfectly fine. It's more of a ready signal.

Option 2 only seems useful to me if you don't use circuit-notation.

So I would prefer removing it altogether. Unfortunately this is currently not feasible due to circuit-notation requiring a Default instance.

@martijnbastiaan
Copy link
Member

So I would prefer removing it altogether. Unfortunately this is currently not feasible due to circuit-notation requiring a Default instance.

Let's fix this. Default is an awful class.

@t-wallet
Copy link
Collaborator Author

So I would prefer removing it altogether. Unfortunately this is currently not feasible due to circuit-notation requiring a Default instance.

Let's fix this. Default is an awful class.

It will be fixed when cchalmers/circuit-notation#25 is merged.

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