Simple expressions in value generics

I have a simple question.
I would like to implement this function:

public static func * (lhs: Self, rhs: Self) -> BiVector<count + 1>

where Self is a Vector<let count: Int>


Is there anything I could do to work around this? And, is there a vague timeline for when simple arithmetic expressions could be supported :slight_smile:

1 Like

The best I can tell is that it is mentioned as one of the future directions in the proposal: swift-evolution/proposals/0452-integer-generic-parameters.md at main Β· swiftlang/swift-evolution Β· GitHub.

I noticed that, but I’d like to know vaguely how many months that would be :slight_smile:

At least in this case I could probably just work around it by hardcoding this operator for a few dimensions

Actually, I was wondering how difficult it would be to implement on my own. It’s just that I made multiple attempts at trying to get the Swift toolchain set up for development over the years, and I can never get the build script to work without errors for me :disappointed_face: