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

Scala 3 Migration Follow up: Context Parameters #426

Open
Mark1626 opened this issue Mar 11, 2024 · 2 comments
Open

Scala 3 Migration Follow up: Context Parameters #426

Mark1626 opened this issue Mar 11, 2024 · 2 comments

Comments

@Mark1626
Copy link
Collaborator

Context Parameters using Implicit Definitions implicit Scala 2, have been reworked in Scala 3 as Given Instances given. There is a decent amount of rewrite needed for migrating to Given Instances.

The official guide also mentions that Scala 3 allows the use of implicit, and that the rewrite can be done in a phased manner. https://www.scala-lang.org/blog/2024/01/23/migration-to-scala-3.html

You might be wondering about all the new concepts and changes. For example, what should be done about implicit splits or enums? You don’t have to rewrite everything right away. Here and there, you can keep using the implicit keyword instead of given and using. The same applies to enums: you can keep using ADTs in the form of sealed traits with case classes and refactor to the new enums later.

Further Reading

  1. https://docs.scala-lang.org/scala3/guides/migration/incompatibility-table.html
  2. https://docs.scala-lang.org/scala3/book/ca-context-parameters.html
@rachitnigam
Copy link
Member

Yeah, this would be a cool thing to update! Especially w.r.t. enum and other new features.

Also, @Mark1626, in general, it might be interesting to chat about what your use case is and if you're looking to grow out Dahlia. I think some of the more ambitious ideas like #69 got dropped because we shifted our focus to other projects if that would be useful, we should talk about it!

@Mark1626
Copy link
Collaborator Author

I came across Dahlia through CIRCT -> Calyx -> Dahlia. I'm interested in Calyx because of MLIR CIRCT, the thing that interests me in Dahlia is the fact that it can target Vitis HLS (a proprietary flow) and Calyx (open source flow). This slightly makes convincing OpenSource hardware skeptics easier (slightly).

I'll send you a DM in Zulip tomorrow, to find a common time to connect and I'll share my current use case.

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