23 ms·
I have a feeling I'm walking into a very dumb question/obvious answer, but here goes. If you're putting getFoo at whatever level of scope that you'd run it ove
by existencebox 8y ago
I have a feeling I'm walking into a very dumb question/obvious answer, but here goes.
If you're putting getFoo at whatever level of scope that you'd run it over multiple bar objects that don't have it bound, why is it conceptually different than writing it as
getFooOfBar(this_bar:hasfoo) => this_bar.foo
(If you get my drift from the terrible notation; and you could drop the type-safety and just take an any obj if we're being more literal to your pseudocode)
I had honestly not seen the bind operator used in at least the last decade, so perhaps the dissonance is just whatever corner of tech I work in having a distinct style/idioms.