I like this feature of c++ so I do feel like I would like to have this in ocean.
Ideas:
op<+>: (a: i32, b: i32) -> (c: i32) { c = a * b; } Would we want to restrict the types that are being overridden??
Basically just function declaration but the function name is op<OPERATOR>
I probably would imagine we could override '()', '[]', and '.' but I don't know how it would work to implement. That being said, I haven't started that so I can probably just figure it out then and make the feature work in as many situations as possible now
I like this feature of c++ so I do feel like I would like to have this in ocean.
Ideas:
op<+>: (a: i32, b: i32) -> (c: i32) { c = a * b; }
Would we want to restrict the types that are being overridden??Basically just function declaration but the function name is
op<OPERATOR>
I probably would imagine we could override '()', '[]', and '.' but I don't know how it would work to implement. That being said, I haven't started that so I can probably just figure it out then and make the feature work in as many situations as possible now