[e-lang] Declaring E version in programs

David Hopwood david.nospam.hopwood at blueyonder.co.uk
Sat Jul 22 21:29:29 EDT 2006


Mark S. Miller wrote:
> This raises the issue of versioning E. E programs have a way to sense what 
> version of E they're running on:
> 
>      ? interp.getProps()["e.version"]
>      # value: "0.8.37a"
> 
> Should E programs have a standard way to declare what version of E they're 
> written in? HTML documents do, and, at least at one point, BitC did. In 
> E-on-Java, there's currently some mechanisms intended to support a declaration 
> such as
> 
>      pragma.syntax("0-8-26")
> 
> This would load (from the CLASSPATH, which is in E's TCB) the resource
> org/erights/e/elang/syntax/syntax-props-0-8-26.txt
> which would contain settings for the same switches that are also controlled by 
> pragma.enable/1 and pragma.disable/1. When code declared as written in version 
> X is run on E version Y, the only operational effect of the declaration would 
> be to effect how it expands to Kernel-E version Y. Post-expansion, all code 
> running on E version Y is running according to version Y's semantics. I think 
> this would strike a good balance between supporting the past and fixing the 
> present.

I believe this is a good idea.

-- 
David Hopwood <david.nospam.hopwood at blueyonder.co.uk>




More information about the e-lang mailing list