9

For many programming languages there are style guides available, e.g. PEP8 for Python, this Matlab style guide or the style guides by Google. For Modelica I found the conventions described in the Users Guide, but is there something more comprehensive available? And, ideally, a tool that helps with the re-formatting, indentation etc.?

matth
  • 2,568
  • 2
  • 21
  • 41
  • One link is now only in web archive: https://web.archive.org/web/20070126105829/http://www.datatool.com/downloads/matlab_style_guidelines.pdf – matth Apr 28 '23 at 06:29

1 Answers1

10

The guidelines in the Modelica User's Guide are the only ones I am aware of. The topic has been discussed several times at the design meetings and I've written one paper that discussed the topic but didn't really propose concrete guidelines.

Part of the issue is that while the Modelica Association might have their guidelines (as your've seen), they don't represent any particular business or industries guidelines which might be different. In other words, I could envision having many different guidelines floating around that are tailored to specific types of models or specific industry conventions. But the Modelica ones are the only ones I am specifically aware of (although it would not surprise me if large organizations using did have their own formal style guidelines).

Michael Tiller
  • 9,291
  • 3
  • 26
  • 41
  • yeah, this is heavily community dependent everywhere. For example, for C++, there are probably about 5 different major style choices, and innumerable smaller ones, whereas for Python, PEP8 was proposed early on, and mostly everybody just goes with that, which I find very convenient. – Christoph Feb 17 '17 at 13:38
  • Any recommendations in the area of thermo-fluid modeling? – Jack Sep 11 '20 at 16:09
  • https://simulationresearch.lbl.gov/modelica/userGuide/development.html#style-guide – matth Feb 12 '21 at 16:45