Re:Pointers Are More Abstract Than You Might Expect in C
by kibwen on Monday July 02, 2018 @09:50AM
(#17441564)
Considering that C doesn't have any good facilities for polymorphism, it's going to continue to be the argument of any language that succeeds C. Unless, that is, that successor language also doesn't have any good facilities for polymorphism, in which case we have Go as a fascinating real-world study in how people will incessantly demand them and deride the language for lacking them (which is saying something, considering that interface{} in Go is already better than pretty much anything one would hack up in C via void pointers or macros).
[ Parent
| on HN ]
Re:Pointers Are More Abstract Than You Might Expect in C
by basementcat on Monday July 02, 2018 @12:10PM
(#17442872)
Apparently under certain conditions it is possible to emulate a crude form of ad hoc polymorphism in C.
https://codegolf.stackexchange.com/questions/2203/tips-for-g...
Re:Pointers Are More Abstract Than You Might Expect in C
by CyberDildonics on Monday July 02, 2018 @11:19AM
(#17442390)
Wasn't it originally a much bigger deal to be able to have the facilities for more generic programming before templates? These days people's threshold for bloat seems much higher, while the penalty for allocation and jumping around in memory are much higher as well.
Re:Pointers Are More Abstract Than You Might Expect in C
by AnimalMuppet on Monday July 02, 2018 @01:18PM
(#17443540)
I presume that you are defining C++'s virtual functions as "not a good facility for polymorphism". Why?
Re:Pointers Are More Abstract Than You Might Expect in C
by int_19h on Monday July 02, 2018 @03:21PM
(#17444600)
OP said nothing about C++, just plain C.
Re:Pointers Are More Abstract Than You Might Expect in C
by AnimalMuppet on Monday July 02, 2018 @03:46PM
(#17444781)
Ah, I see. I agree.