Skip to content

Opaque Types in Book #2158

@bblfish

Description

@bblfish

https://github.com/scala/docs.scala-lang/blob/main/_overviews/scala3-book/types-opaque-types.md

That page is very nicely written and helpful.
Reading it does make me wonder if one looses the efficiency gains if one combines a bit of the abstraction with the opaque types.

For example it seems like it could still make sense to have a trait Logarithm with a type Logarithm and then have a couple of specialisations: one for Double and one for BigInt perhaps, ...

We have a library like that in Banana-RDF that used Projection types (see description here) which are deprecated and so I it could be that we want a way to replace those with opaque types. Note that we did have a leakage problem in banana-rdf.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions