BinaryTraits.jl icon indicating copy to clipboard operation
BinaryTraits.jl copied to clipboard

Can do or not? It's easy. See https://tk3369.github.io/BinaryTraits.jl/dev/

Results 9 BinaryTraits.jl issues
Sort by recently updated
recently updated
newest added

MWE ```julia using BinaryTraits using BinaryTraits: Prefix julia> @trait Foo julia> @implement Prefix.Is{Foo} by f(_, x) julia> struct Bar end julia> f(::Bar, x) = 1 julia> @assign Bar with Prefix.Is{Foo}...

I would like to apply a default trait to an abstract type, and then special case some subtypes with the negated trait. Take for example below: ``` abstract type Bar...

Addresses !60 and introduces a test which fails on `master` but passes on this branch. The fundamental issue this PR addresses is the following: We can apply `Positive{Trait}` to an...

If I define a module and then try to verify interfaces from outside of the module, it gets confused: ```julia julia> module Foo using BinaryTraits using BinaryTraits.Prefix: Is @trait Cute...

This is a pretty minor issue but prefixes are constants so they print out as `Positive` or `Negative`. There's clearly an advantage to having a constant instead needlessly creating a...

Some interfaces requires the implementer to define a function that returns `true` so that it knows if a type has implemented the interface at runtime. Examples: - `Tables.istable` - `IteratorInterfaceExtensions.isiterable`...

discussion

See https://discourse.julialang.org/t/ann-binarytraits-jl-a-new-traits-package/37475/5?u=tk3369 In a nutshell, the ideas are: 1. do not allow anyone to add new interface functions to an existing trait. 2. check the interface implementation correct as soon...

feature
syntax

It should be possible to define interfaces, which require more than one interface type. Example with proposal for syntax: ``` @trait ProblemDescription prefix Is,IsNot @trait Solve @implement Tuple{IsProblemDescription,CanSolve} by solve(_2,...

feature
syntax

The types/functions generated by the macro should be documented.

feature