News for hackers. Stuff that matters.
Re:Zig-style generics are not well-suited for most languages by throwawaymaths on Sunday October 09, 2022 @07:51PM (#33146418)
I think this could be basically done as a check in the stdlib relatively easily, via something like:

    const MyConcept = std.concept.build(.{...});

    const requires = std.concept.requires;

    const MyType = 
      requires(
        MyConcept, 
        struct{
          ...
      });
requires simply passes through the type passed to it.

If it fails, it gives some nicely formatted compile time errors.

There are no comments on this comment yet.