3 ms·
If you think this is good, wait until you find out about statically typed languages and IDEs with code navigation features.
by recursive 13y ago
If you think this is good, wait until you find out about statically typed languages and IDEs with code navigation features.
- ajross 13y agoNo, you can do this sort of madness in C too via function pointer tables. Give the function pointer field in your struct a commonly-grep-spammed name like "close" and watch your readers go mad trying to figure out what xxx->close() does.
- Peaker 13y agoVirtual tables are not quite the same thing. You can grep for every instantiation of the struct in the code-base. If anything, macros are more problematic: #define VTABLE_INIT(prefix) \ (struct vtable){ .add = &prefix##_add, .sub = &prefix##_sub, and so forth }
- phleet 13y agoI've done a bunch of work with statically typed languages and am not about to argue that dynamic languages can be as easily navigated or statically analyzed by IDEs as statically typed ones can. That said, dynamic languages still have a great deal of value, and a significant portion of the programming population uses them, so I still think it's worthwhile to set down some useful rules of thumb.
- Peaker 13y ago> dynamic languages still have a great deal of value I used to think this too.
- wes-exp 13y agoIf you think that is good, wait until you find out that Lisp has similar code navigation features under SLIME and yet is a dynamically typed language.