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

One place it's used is to avoid central "registration" for multiple "things". For example, consider a program with many fairly separate "subcommands". Using this mechanism allows adding a new subcommand simply by linking in a new source file (without changing a shared source file to list the new command).


I use this idea in embedded work, where the code is split into "modules". The same firmware source is shared amongst various differing pieces of hardware, each of which utilise a different subset of modules.




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

Search: