-
Notifications
You must be signed in to change notification settings - Fork 8
Description
I'd like to open a discussion about the recommendation to use toolbox/ as the main folder for user-facing MATLAB code in open-source projects. I realise there is probably some history behind this choice that I’m not aware of, so apologies if this topic has already been settled.
The way I see it, there are three candidate options:
toolbox/src/<toolboxname>/
1. toolbox/
-
✅ Fits well with the MATLAB Toolbox framework (e.g., toolbox packaging and generating an .mltbx file).
-
✅ Standard name—if you know the pattern, you immediately know where the end-user code is located.
-
❌ MATLAB-centric term; might confuse developers who are used to other languages (Python, Java, etc.).
-
❌ Very specific, and not every package feels like a toolbox.
2. src/
-
✅ Widely used across many languages and immediately recognizable.
-
✅ Standard name—if you know the pattern, you immediately know where the end-user code is located.
-
❌ Short for “source” and reads a bit awkwardly. (“addpath src”)
3. <toolboxname>/
-
✅ Can create a shallower folder structure—no need for
src/<toolboxname>ortoolbox/<toolboxname>. -
❌ Harder to spot quickly when entering an unfamiliar repository; it requires scanning all folder names.
Overall, I tend to prefer src/ because of its widespread use and the generality of the term. Of course most of this is highly subjective, but would be interested to hear other opinions and reasonings!