Skip to content

Support for separators #3

Description

@as2te

Hi @LyonSyonII

As of now I don't think there is a good way to express some repetitions:

impl<T> Foo for T where T: Baz<A> + Baz<B> + ... {}

//We could do
akin! {
    let &Type = [B, ...];
  
    let &bound = { + Baz<*Type> };
  
    impl<T> Foo for T where T: Baz<A> *bound {}
}

//Or
akin! {
    let &Type = [A, B, ...];
  
    let &separator = [NONE, +, ...]

    let &bound = { *separator Baz<*Type> };
  
    impl<T> Foo for T where T: *bound {}
}

It would be nice to be able to specify a separator. Maybe something along those lines:

akin! {
    let &Type = [A, B, ...];
  
    let &bound = { Baz<*Type> };
  
    impl<T> Foo for T where T: *{+}bound {}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions