[stringtemplate-interest] ST 4.0 planning

Terence Parr parrt at cs.usfca.edu
Mon Sep 8 11:13:10 PDT 2008


On Sep 8, 2008, at 11:09 AM, Roman Odaisky wrote:

> On Monday, 08.09.2008 20:48:19 Terence Parr wrote:
>
>> 1. In principle, we could use the rechargeable architecture pattern  
>> of
>> ANTLR to generate whatever source code we want; C++ and so on. the
>> only requirement would be some sort of reflection still because I
>> don't want attributes to be typed in ST. That means that you'd need
>> RTTI for C++, which it supposedly has now.
>
> No, C++ RTTI won’t help.
>
> Someone would have to define the mapping between attributes and  
> their names
> manually.

Doh...would that beOverly burdensome? In other words, should I abandon  
targeting languages that have no reflection?

>> I'm planning on breaking with absolute backward compatibility to  
>> fix a
>> number of design flaws that came about because requirements changed
>> during the last eight years.
>
> Quite a lot of ST is redundant. if, separator, null, etc. I wonder  
> what would
> happen if ST were brought to an absolute minimum and then a more  
> concise
> syntax were devised for it.

Well, we don't want to turn it into Lisp (i.e., remove all syntax  
except function call) ;) ha!

> ST already has everything a functional language needs: car, cdr and
> recursion :-)

:)

> And at last some delimiters apart from $$ and <> have to be invented!

Yep, that would necessitate going to a handbuilt lexer, but would  
actually be a good idea because it could consolidate the two separate  
lexers I have now. The lecture is actually straightforward... it just  
breaks up templates into literals and expressions

Ter


More information about the stringtemplate-interest mailing list