Skip to content

Typeclass-based extractors #78

@propensive

Description

@propensive

The implementation of the n extractor in Nomenclature constructs an object with both apply and unapply methods. This approach could be generalized to implement any extractor, with apply and unapply being implemented with typeclasses.

The type of the interpolation object would be something like, Interpolation[("before", "after"), "prefix"] for an application of prefix"before${x}after" or case prefix"before${x}after".

This wouldn't change much for the implementation of interpolation expressions, but would make pattern matches clearer.

Metadata

Metadata

Assignees

Labels

apiRelates to the API designenhancementAn improvement to existing functionality

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions