top | item 46520225

(no title)

aDyslecticCrow | 1 month ago

> "owned" and "borrowed" > java 1.4's

You're getting into pedantics about specific languages and their implementation. I never made a statement about C++ or java. I work in primarily in c99 myself.

> the utility of making them implicit is close to nil. > Without relying on interfaces or inheritance.

Implement a function that takes three strings without 3! permutations of that function either explicitly or implicitly created.

discuss

order

masklinn|1 month ago

> You're getting into pedantics about specific languages

No, I'm using terms which clearly express what I'm talking about, and referring to actual historical experience with these concerns.

> Implement a function that takes three strings without 3! permutations of that function either explicitly or implicitly created.

In the overwhelming majority of cases this is a nonsensical requirement, if the function can take 3 borrowed strings you just implement a single function which takes 3 borrowed strings.

In the (rare) situation where optimising for maybe-owned makes sense, you use a wrapper type over "owned or borrowed". Which still needs no "interface or inheritance".