From SLangTNG

Frequently asked questions

  1. What is SLang?
    SLang means Structural Language. It is an interpreted script language with a rather terse syntax. Its development started in 1992 at the University of Innsbruck. The primary purpose of the development was to provide a close interaction framework between stochastic and structural analysis, in particular for the treatment of random field problems in the context of Stochastic Finite Elements.
  2. Why did you start to develop SLangTNG?
    In 2007 it was fully clear that the ANSI-C foundation of SLang was not sufficiently flexible to accommodate recent developments in algorithms and GUI. At the same time, the functionality of the scripting language as well as its performance were insufficient. Therefore a completely new project based on C++ with automatic binding to Lua (the fastest available scripting language) was started.
  3. At what problems does TNG target?
    TNG still aims at a close interaction between structural analysis based on variational principles with mathematics and/or stochastics. Due to the fast scripting language and the rich mathematical interface structure many problems from e.g. structural dynamics can be solved very efficiently.
  4. Why don't use MATLAB (TM), MAPLE (TM), Mathematica (TM), etc.?
    TNG gives us the freedom to implement new functionality and bind it automatically to the scripting language. Also, everything is based on free software (BSD-style licenses).
  5. Why not just FORTRAN?
    Although FORTRAN is well established and highly performant, we decided to go with the C++ standard, in particular because of well established header-only mathematical libraries such as Eigen or GUI-libraries such as QT4.
  6. Why did you chose Lua as scripting language?
    Lua was the fastest scripting language when TNG was startet. Compared with Python it may be faster by several factors depending on the task. Furthermore, Lua is very simple to use yielding a fast learning curve. It is lightweight, opensource, and provides most structured programming techniques (plus its own meta programming)
  7. Why did you chose SWIG for interface binding?
    Currently, there are three widely used interface generators for Lua: tolua++, SWIG and luabind (aka boost::python). SWIG has the advantage that it is very easy to make huge changes on C++ level and rebuild the complete binding in one step. It also supports multiple target languages at one time (in case we want to switch to Python, etc.). Luabind is also a nice candidate. Compared with SWIG it manages to create scripting code which is closer to the C++ structure; many C++ language features are embedded into the Lua syntax in a more intuitive way than when using SWIG. It also provides its own object oriented programming paradigm for Lua and one can even derive Lua objects on C++ level. However, benchmarks show that SWIG produces significantly faster binding code. It is also simplier to use. As long as there is no need to use the object oriented programming features of Luabind, SWIG became the choice.
Information for users
Personal tools