Why Nostr? What is Njump?
2023-08-07 21:45:02
in reply to

npub1v6…s9004 on Nostr: npub1kpwlx…xxzz4 Rust traits (~interfaces) bypass this problem by having the ...



Rust traits (~interfaces) bypass this problem by having the ability to refer to the type that implements this interface in prototypes of required functions (so you can say that an interface requires e.g. a function `append_element` that returns the same type as the the type that implements this interface).

Naturally, that can only work in languages where you cannot inherit from anything other than interfaces. (It still works for interfaces inheriting from other interfaces, though.)
Author Public Key
npub1v67gmn7f4vlg3fcrk8up3p08rkmqqaxmw0he3hf9f8h09jre332qds9004