Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"(if you want function pointers, just use function pointers, and forget all this modern "object oriented" garbage)"

Why not use just functions as first class data?



> Why not [just use] functions as first class data?

Because they're not. When you copy an object, you don't copy all of its methods; instead, you copy all of its function pointers.


I mean there are languages that have functions as first class data. Not wrapped up in objects. Think Lisp, Scheme, Haskell. Even Python can do this - otherwise map and filter would hardly work.


Btw: I really meant 'just functions', nothing around them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: