Tuesday, March 14, 2006
Why writing a transitional compiler
I released SmartEiffel 1.2r6 recently. This is a project that I started last year. It is a sort of manteinance branch of SmartEiffel 1.1 (not official, but approved by the official team) and fixes a handful of bugs without breaking backwards compatibility.
However, my motivations to start the project were not just mantainance and bugfixing (most of the fixed bugs were fixed in 2.x, anyway). I got frustrated trying to do three different things:
This last release reached a success milestone: it is able to compile itself, 1.1 software, and it can be compiled with SE2.1. So the compiler itself has been used as a working example of its usefulness as a transitional compiler.
Besides the initial goals, there were some valuable lessons learned:
However, my motivations to start the project were not just mantainance and bugfixing (most of the fixed bugs were fixed in 2.x, anyway). I got frustrated trying to do three different things:
- Using code that I had written for SmartEiffel 1.1 together with new SmartEiffel 2.x libraries and tools
- Porting my libraries to 2.x, without removing support for 1.1 users
- Writing new code, using SmartEiffel 2.x, using third party libraries that used to work in SE 1.1.
This last release reached a success milestone: it is able to compile itself, 1.1 software, and it can be compiled with SE2.1. So the compiler itself has been used as a working example of its usefulness as a transitional compiler.
Besides the initial goals, there were some valuable lessons learned:
- Mantaining the compiler code, even when I didn't write it, is not hard. Without any specific compiler-writing knowledge and a few monthly hours to put into this, most bugfix or desired features were added in one of two days.
- Adding workarounds to compile code for two slightly different languages and slightly different libraries is certainly possible.
- Preserving compatibility makes some things ugly here and there. But I have received several thankful messages, and no complaint. So despite the uglyness, users like that a lot. And in my pragmatical point of view, it means that the ugliness was worth it.
Comments:
<< Home
Daniel, it's very impressive that you can compile SmartEiffel 1.2 with itself and with SmartEiffel 2.1.
Your last paragraph makes me wonder: are you planning to include ISE compatibility hacks in SmartEiffel 1.2?
Your last paragraph makes me wonder: are you planning to include ISE compatibility hacks in SmartEiffel 1.2?
I have no experience with ISE. I have played with the free version but haven't written real software on it. So I wouldn't know what to change
However, I would gladly accept suggestions or patches to support constructs from other compilers, as long as they don't break 1.1 compatibility, and warnings are issued for things that are not 2.x compatible.
In fact, I already have done it in the past with the type-rules for assignment-attempt.
However, I would gladly accept suggestions or patches to support constructs from other compilers, as long as they don't break 1.1 compatibility, and warnings are issued for things that are not 2.x compatible.
In fact, I already have done it in the past with the type-rules for assignment-attempt.
Thanks i'm looking at these pages. There are also some explanation on the wiki of SEV1.2 with "Changes in the language" and "Changes in the language".
I'm wondering about that because i think there are big and small problemes in all the compatibility breaks.
For example the probleme with Case sensitivity isn't so dramatical IMHO : one can write a small program that take all identifier and rewrite them into the right syntax.
But a change in the basic library are more problematics...
And Daniel congratulation for the new version of SEv1, a very useful thing i think.
I'm wondering about that because i think there are big and small problemes in all the compatibility breaks.
For example the probleme with Case sensitivity isn't so dramatical IMHO : one can write a small program that take all identifier and rewrite them into the right syntax.
But a change in the basic library are more problematics...
And Daniel congratulation for the new version of SEv1, a very useful thing i think.
It is indeed wonderful what you've done Daniel.
I've been playing with the idea of helping you by creating a .msi file of SE + additional libraries such as Gobo and eposix, all precompiled. That would help a lot of users, just what elj-win32 did years ago.
But time, time.
Post a Comment
I've been playing with the idea of helping you by creating a .msi file of SE + additional libraries such as Gobo and eposix, all precompiled. That would help a lot of users, just what elj-win32 did years ago.
But time, time.
<< Home