[stringtemplate-interest] render vs toString
Zenaan Harkness
zen at freedbms.net
Mon Oct 12 17:41:49 PDT 2009
Of course, entirely possible, and quite desirable by some I'm sure.
However, primary interface for using any and all ST features should
begin as command-line/ pipe/ unix text streams.
It would be sad to lose the "it can all be done without a gui" feature
of ST (as in, including certain debugging steps). At least, where it's
not otherwise necessary to break command line compatibility, let's not!
If for some reason, stdout and stderr are too arcane for your likings,
or not cross-platform compatible or something, then simply add an option
for the "debug output version" to go into a specified file.
cheers
zen
On Mon, Oct 12, 2009 at 12:24:16PM -0700, Terence Parr wrote:
> Could we add a GUI widget to display the results?
> Ter
> On Oct 11, 2009, at 4:10 PM, Zenaan Harkness wrote:
>
>> On Sun, Oct 11, 2009 at 01:52:59PM -0700, Terence Parr wrote:
>>> heh, it's pretty hard to debug ST when the debugger calls toString
>>> all
>>> the time on the templates. Using render makes much more sense. But,
>>> from a user perspective do you folks also run into trouble because of
>>> this or is it only debugging ST itself that is troubled by toString
>>> ()?
>>
>> Never been a problem for me, an ST user.
>>
>> When I'm debugging, I'm mostly debugging templates - I use a simple
>> driver model, so not a lot of code to handle, but plenty of templates.
>>
>> Sor example, this causes difficulty when I use template debugging mode
>> (outputting angle backets for example), since this causes my template
>> conditionals to not work properly (there's always some strings output -
>> the angle brackets and template names - so conditional is never
>> empty);
>> I think what might be useful here is a way to separate those "template
>> debugging outputs" from my "usual expected" outputs. Perhaps stdout
>> and
>> stderr, except you'd probably need a .sync/ .flush after each element
>> is
>> output, so that the streams 'merge' properly, so that on the screen
>> (stdout + stderr), you the output which includes debugging output, but
>> in my output file and within the template processing proper (just
>> stdout) normal ST output would appear. All that disk/ stream syncing
>> would slow things down, but we're in debugging mode, so that's
>> expected...
>>
>> Make sense?
>>
>>
>> --
>> Homepage: www.SoulSound.net -- Free Australia: www.UPMART.org
>> Please respect the confidentiality of this email as sensibly
>> warranted.
>> _______________________________________________
>> stringtemplate-interest mailing list
>> stringtemplate-interest at antlr.org
>> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
--
Homepage: www.SoulSound.net -- Free Australia: www.UPMART.org
Please respect the confidentiality of this email as sensibly warranted.
More information about the stringtemplate-interest
mailing list