Scripting languages and IDEs

Colin Putney cputney at wiresong.ca
Fri Aug 25 15:21:49 UTC 2006


On Aug 25, 2006, at 9:02 AM, Lex Spoon wrote:

> Bert Freudenberg <bert at impara.de> writes:
>> Reading this I'm not sure everybody is aware of how the chunk format
>> works, because it actually is not declarative.
>
> It's a philosophical question, actually.  It is declarative if you
> want it to be.  FilePackage, for example, reads chunk format without
> executing it.  It can do this because the actual uses of chunk format
> are far less general than the general format Bert describes.  (Which,
> by the way, is great to have written down, thanks!)
>
> To put it another way, chunk format is executable, but that does not
> mean you have to execute it.
>
> This may seem like a nitpick, but I am jumping in because I keep
> hearing people say that this or that is hard when using chunk format
> because the files are not declarative.  They are declarative if you
> want them to be, and there is a declarative-style reader already
> implemented.

True, but only up to a point.

(Most of) the chunk files in existence today can be parsed  
declaratively because they were generated automatically based on  
classes and methods in the image. The fileout code examines those  
objects and deterministically generates a program that will recreated  
them. Because we know how the fileout code works, we can infer the  
objects from the program without executing it.

However, the current discussion is about syntax for a scripting  
language. If chunk format was adopted, it would not be a  
philosophical question. Parsing would have to be specified to be  
either declarative or imperative. Humans writing chunk files with  
text editors would *not* produce files that could be parsed either way.

Colin



More information about the Squeak-dev mailing list