[TYPO3-mvc] RFC: New comments in FLUID

Michael Knoll mimi at kaktusteam.de
Thu Mar 1 17:45:01 CET 2012


sorry - but I think, most of you did not read my blog post:

1. I already implemented everything required in the parser. 4 lines of 
code. No big change - no drawbacks no side effects. I know the internals 
of Fluid parser - it consists of complex regexes - no LR parser or stuff 
like this...


2. using a viewhelper is not the way to go here, as this
a) Is to much effort to read / write
b) Is not shown as comment (syntax highlighting) in IDEs


3. Whether a browser can read <!--- ---> as a comment or not is no 
problem here, because we never render FLUID code in a browser, only the 
HTML it outputs and there is no more <!--- ---> in there because it is 
filtered out by the parser completely.


4. It is no problem to write <!-- --> as comments to be rendered in HTML 
because those comments won't be touched by my solution.


5. It does not matter that <!--- ---> makes Fluid code non-well-formed 
because Fluid code is not well-formed afaik.


So please - leave church in town as we say :-) - add those 4 lines of 
code in the parser and everybody has a nice way of writing comments that 
are highlighted as comments and are easy to read and write.


Thanks & regards

Mimi

P.S. I don't mind whether it is <!--- ---> or <!--xyz zyx--> as long as 
it is highlighted as comment.





Am 01.03.12 12:01, schrieb Sebastian Schreiber:
> Hi everybody,
> i totaly agree with Claus and Stephan.
> My vote is also a clear no, not necessary at all.
> I just don´t need it and don´t want to suffer all the drawbacks.
>
> Sorry.
>
> Am 01.03.2012 11:46, schrieb Claus Due:
>> Hi everybody,
>>
>>> I just read all of your comments and thought a lot of "no, please
>>> don't" :).
>> Yep. I have that same feeling after loosely reading. And here's why:
>>
>>> If we really want a dedicated comment syntax, we should go for
>>> "<f:comment></f:comment>" as a tiny non-rendering comment view helper.
>> Fluid already has f:comment. Why do we need a change that increases
>> parsing time, complicates transparency and uses off-standard
>> annotations, when we already have something that does exactly what is
>> needed? Is this for aestethic reasons in your editor's code
>> highlighting? If so… then I would have to say that pushing for a core
>> change in Fluid itself is rather optimistic given the severe
>> implications.
>>
>> My vote is a clear no. This is bad thinking. We don't want this given
>> the performance and transparency concerns combined with the fact that
>> what you desire to do is already possible to do. Sorry, but it's just
>> not smart and not necessary.
>>
>> Cheers,
>> Claus
>> _______________________________________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>
>



More information about the TYPO3-project-typo3v4mvc mailing list