[TYPO3-dev] TypoScript vs. other configuration langugas

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Tue May 8 10:00:16 CEST 2007


Hi,

I think the thread needs a new topic. Here it is. 

It took me 10 minutes to understand the syntax of TS. To learn the
semantics is something different. Here the current version of TS has it
issus and you can't do it without the permanent help of TSref. The
semantics are not logical overall and has some some ambiguities. 

The result of this semantic issus is, that compilers, that go into
details, are difficult or impossible to implement. What follows is that
speaking error messages and context help are very poor and make TS so hard
to use. 

But with a systematic semantics TS becomes a very powerfull langage and
will be a great tool for V5. It has one special strength that other
configuration languages don't provide. That is the pointed syntax. 

In classical PHP I can either say:

$var[my][home] = "castle";

witch is a string or 

$var[my][home][building] = "castle";
$var[my][home][environment] = "garden";

witch replaces the string by an array. String and array can't
exist at the same time.

So to extend $var[my][home] = "castle"; I have to redifene the variable to
a completely different structure. This leads to compatibily issus with
older version. 

TS offer a cool solution. I can keept the old setting:

my.home = castle

and extend by 

my.home.environment = garden

The matching trick on PHP level:

$var['my.']['home'] = "castle";
$var['my.']['home.']['environment'] = "castle";


With this I can extend at any time without compatibility issuse. That is a
great feature I like very match in TS. None of the other easy-to-write
configuration languages I compared (YAML, Json) provide something like
this. 

A may be wrong. In this case I would like to get examples how an
equivalent extension can be done in another language.

Just my 5 cents

Elmar




More information about the TYPO3-dev mailing list