hkaiser changed the topic of #ste||ar to: STE||AR: Systems Technology, Emergent Parallelism, and Algorithm Research | stellar-group.org | HPX: A cure for performance impaired parallel applications | github.com/STEllAR-GROUP/hpx | This channel is logged: irclog.cct.lsu.edu
<K-ballo> I don't know catches of using an int
<K-ballo> > When we were using interfaces, we could store an instance of each of Cow, Pig and Dog in an array of Animal
<K-ballo> not _exactly_, it's storing pointers to those instances, not the actual instances themselves, that'd be impossible just as it is with templates
<K-ballo> you can store type-erased pointer-like types with templates, just as well
<K-ballo> the subsequent part on template bloat is fair though
<K-ballo> fwiw the context, which gonidelis failed to include, is https://davekilian.com/cpp-type-erasure.html
<gonidelis[m]> lol
<gonidelis[m]> ahh
<gonidelis[m]> so what does he mean "If the concrete type is known, the method can explicitly specify the concrete type, non-polymorphically" ?
ahmed has quit [Quit: Connection closed for inactivity]
<K-ballo> it's trying to say methods calling sayAndFoo may need to become templates themselves
<K-ballo> *seeAndSay
<K-ballo> you could have `void handlePig(const Pig&)` but you'd need `template <typename T> void handleAnimal(const T&)`
<gonidelis[m]> that's the second part of his argument
<gonidelis[m]> what's "specifying the concrete type non polymorphically" ?
<gonidelis[m]> that's what i don't get
<gonidelis[m]> :/
<K-ballo> `void handlePig(const Pig&)` is specifying the concrete type, `Pig`, non polymorphically
<K-ballo> a function that deals with a concrete type knows what that type is, doesn't need to be a template
K-ballo has quit [Quit: K-ballo]
K-ballo has joined #ste||ar
diehlpk_work__ has joined #ste||ar
diehlpk_work_ has quit [Ping timeout: 240 seconds]
diehlpk_work__ has quit [Ping timeout: 260 seconds]
diehlpk_work has joined #ste||ar
diehlpk_work has quit [Ping timeout: 260 seconds]
diehlpk_work has joined #ste||ar
diehlpk_work_ has joined #ste||ar
diehlpk_work has quit [Ping timeout: 240 seconds]