Hacker News new | ask | show | jobs
by vsskanth 2185 days ago
a quick intro for programmers - Modelica is basically the equivalent of Haskell for engineers - the compiler does most of the work for you and produces highly performant code. You can compose a very complex system from individually modeled elements. The Modelica compiler will check constraints and basically come up with a system of equations. If it compiles, it is probably correct. The model wont compile if a particular variable is being modified in two places. Models have full introspection where you can observe any variable you choose.
1 comments

That's an interesting way of framing it. I tend to agree. It isn't so much the presence of the type system so much as the fact that the compiler is given sufficient information (much of it symbolic) to aggressively optimize the generated code. So it seems to share that with Haskell, yes.