[Pharo-dev] Encoding method source code in Tonel

Denis Kudriashov dionisiydk at gmail.com
Fri Nov 10 11:03:33 EST 2017

2017-11-10 16:30 GMT+01:00 Martin McClure <martin at hand2mouse.com>:
> Tonel is intended to be, I believe:
> * For Smalltalk primarily (although there are other languages)
> * Be for any Smalltalk dialect (although the first implementation is for
> Pharo, it is being ported to GemStone, and we intend to port it to VW and
> VA)

Interesting how it will be handled when Pharo will use slots abstraction
exclusively. And more simple, when there will be only package and tags
instead of class categories.

> * Be human-readable (some people want to be able to use tools like GitHub
> to look at diffs and such)
> * Be human-editable using normal text editors (important for porting --
> sometimes you just have to edit the source before it will load, for
> instance)
> I think that Tonel using [] to enclose the source is a pretty good idea. A
> proper parser should be able to correctly parse Smalltalk code from any
> dialect, and it makes it human-readable and human-editable.
> However, as has been noted in this thread, it would also be nice to handle
> non-Smalltalk code. One way to do this (one that was in an earlier proposal
> but is not currently in Tonel) is to use pure STON for any source code that
> does not have standard Smalltalk syntax.  A method like this would look
> something like:
> { 'category' : 'public',
>    'source' : 'whatever the source code is, with STON escapes as
> necessary' }
> Regards,
> -Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20171110/3ac5a57d/attachment-0002.html>

More information about the Pharo-dev mailing list