Why flat .ini files?

edited December 2015 in General discussions
Consider this an amateur programmer trying to learn something from a more seasoned one, but iarwain, why did you choose flat .ini files over .xml files or perhaps another established markup language?

Comments

  • edited December 2015
    Just my two cents; I'm not sure if .ini files are as flat as you might think. For example, when you say:
    [SomeObject]
    Graphic = SomeGraphic
    ...
    
    [SomeGraphic]
    Texture = ...
    

    You could imagine "SomeGraphic" to be somehow "embedded" inside "SomeObject". What's actually nice is that the relationships this way aren't hierarchical. So, unlike a JSON or XML file, the relationship is not like a tree, but it's like a general graph.

    Even though the nested structure of XML might sound conceptually appealing, the tree-like relationships are quite restrictive, and, IMHO, trees fall flat in modelling most interesting concepts.

    To sum up, I don't think Orx's inis are any more flat than C or C++ source files.
  • edited December 2015
    Enbayram said it all! :)

    Data is indeed represented as a disconnected graph whose parts are easy to replace and whose flow is easy to remodel.

    It has also the additional advantages to be easy to parse, easy to enhance (think of inheritance) and easy to read. Can't say the same thing about XML. ;)
Sign In or Register to comment.