pcb-rnd knowledge pool
The programming language war
langs by Tibor 'Igor2' Palinkas on 2016-08-02 | Tags: insight, programming, languages, scripting, ruby, perl, python, java, scheme, lisp, awk |
Abstract: Policy on programming/scripting language and dependencies.
Reflecting to (but not joining) the annual geda-user language/libs debate, the policy of pcb-rnd (and sch-rnd and camv-rnd) on this:
- the core part of the code is in C - not in C++, C#, cobol, ada, haskell, etc.
- external dependencies are minimized, especially core shouldn't depend on too many external libs and tools (e.g. core shouldn't depend on glib)
- core doesn't know anything about [turing complete] scripting languages, user scripting is provided by a plugin
- the scripting plugin does not attempt to restrict the user to My Favorite Language - it rather supports 10+ different languages, from ruby through awk through python to lua; it even supports an older version of guile; all languages are options.
The above set of rules is crafted so that compiling core functionality is easy and excess external libs (gtk, glib) are needed only for optional features (such as the gtk hid in pcb-rnd). However, it's equally important not to restrict users in optional extras that may require more dependencies. This is solved by minimizing core and moving functionality behind APIs in a plugin system.
This policy is very unlikely to change in the future - if you believe the core should be rewritten in your favorite language, please fork the project or start a new one.