EiffelStudio 6.6 released
by Manu (modified: 2010 May 29)
- Tags:
- Release
- eiffelstudio
We are pleased to announce the availability of EiffelStudio 6.6. It can be downloaded at http://www.eiffel.com/downloads.
The release notes are available at http://docs.eiffel.com/book/eiffelstudio/release-notes-eiffelstudio-66.
To me this release brings even more stability and some new language features which I'll highlight below:
- Some incremental bugs that usually affects large and complex recompilation have been addressed.
- Our multithreaded runtime has been rewritten to be even more portable and to guarantee the same behavior of mutexes across platforms (before mutexes were recursive on Windows but not on our other platforms, now it is always recursive).
- We have introduced once per object and the new once syntax (
once ("PROCESS") oronce ("THREAD") oronce ("OBJECT") ). - We have introduced the new check instructions to simplify the writing of void-safe code:
- We have introduced this not yet adopted feature of the ECMA specification that has been requested by some Eiffel users for many years. The name is not yet decided, so far we have two attempted names: RAT (Remote Anchorted Types) or QAT (Qualified Anchored Types). It basically let you write a type declaration using
like with not just a feature name but with an expression, that is to saylike a.b.c . This is very practical to reduce the number of copy/paste in types and let you evolve your software easily by only changing a type at one place, instead of at many places (think of changing all your declarations of LINKED_LIST into ARRAYED_LIST in your code).
Tell me more about your experience using EiffelStudio 6.6 and what you are planning on doing with it. In the meantime, Happy Eiffeling!
Manu
Block statement
Thanks for the short summary of the new features: I'll keep an eye open to see how helpful they are :-)
I saw the new shape for the check statement before but I haven't seen a justification yet for introducing a block around the scope of the object test local. More precisely, I don't see why we wouldn't extend the scope of the local until the end of the block statement that includes the check. Can you enlighten me on that subject please?
Mostly because if you decide to disable assertions, then the object test local does not have a meaning anymore. Of course you could have a rule that the compiler keeps the check.
Now when an object test local appears in a precondition, we have decided that the scope is only the precondition, not the body. Why? Because if you redefine the routine that has a precondition with an object test local, it would mean that you could use it, but when looking at the redefined routine, you would not know what the meaning of the identifier.
Mixing both arguments and for consistency, we decided the same for check, the object test local is only valid within the check, not after.
Check statement
I had noticed some bugs with thecheck ... then ... end statement, I will try to reproduce them with the official release.
Why remote? It's the first time I see it in the context of Eiffel.
How to name the new anchored type is a dilemna. Will we have CATs and QATs, or CATs and RATs? ;)
I guess it's nice to have such consistency but, as it happen, I would be very happy if there was some way to use the locals introduced in a precondition even if, to use it in a redefinition, I had some syntactic overhead. For instance, I think the following kind of declaration would be totally justified:
where object_test_local would be the name given to the attached entity resulting from an object test in the precondition of {SOME_PARENT}.some_routine. I expect that it could be smoothly extended for the case where a routine is a redefinition of more than one routine. For example, there could be a renaming clause to merge or separate object test locals. Also, in the case of a set of disjuncted preconditions, I would expect that, to be useable, an object test local would have to be bound in each of the precondition and it would keep the binding created by the first precondition to be completely evaluated to true. It might seem a bit complicated but I am certain that it is completely worth the trouble just to be able to profit from the object tests in preconditions. The alternative that I had to use so far was to repeat the object test in the body of the routine. This is very inconvenient.
Has any such alternative been studied so far? If so, on what ground was it rejected?
Let me put in a request of mine:
I would like to get a better stack dump, basically the SmartEiffel like stackdump. So the proper line of the code where the error occurred + a dump of all local variables and the first level contents of the objects. Perhaps everyone is always using EiffelStudio when running their code, and I'm the only one who hardly ever does.
An interesting substitute would be a dump file I can load in EiffelStudio.
remote anchored types
Having remote anchored types (like a.b.c) is basically a good extension to the language and in reflects a need in programming generic classes (not often needed; but if needed, it is very practical).
However the form
like a.b.c' is not sufficient. In some cases there is no argumentless query
a' in a genericclass C[G] ...' to start the remotely anchored type. Sometimes only the formal generic type
G' is available to start the anchor chain.Therefore I would like to see the extension
to anchor a type within a generic
class C[G->CONSTRAINT]' to the result type of some query of its formal generic
G'or alternatively (but more confusing)
too allow the start of the anchor chain `a' to be a query with arguments of the surrounding class.
A need of this extension is described (though not in detail) within my blog http://eiffelroom.com/node/396 which gives a solution to the catcall problem.
Type-anchored types
The notationlike {T}.x.y , where T is some type, is indeed supported by this release. The original RAT (Remote Anchored Types) proposal used only the feature name chain, then there was a proposal that uses a type instead of the first feature name (it was called TAT). The combined mechanism QAT (Qualified Anchored Types) allows for both variants.
Use of new check assertion
I re-coded my example of a MAYBE class using the new check form of assertion:
Finally the program actually behaves as it is supposed to. That is, a caller of from_just, when the precondition does not hold, get a pre-condition violation (if pre-conditions are monitored), or otherwise an assertion violation (even with all assertion monitoring disabled).
Looking at the code for from_just, the noise is confined to the check statement block (equivalent to an if statement). I still maintain this is too much noise. The pre-condition should act as a CAP, and so we should not have to perform an object test (that is, we ought to be able to simplify the body to Result := object). And while the type checker remains insufficiently powerful to prove that the precondition always holds, it can generate the same runtime-check (in void-safe mode) that the check block generates.
Void safety type-hole
There still appears to be a bug with Void safety. The following program compiles happily in Void-safety mode, and at runtime reports a call-on-void-target violation:
If you change the type of hast toattached HASH_TABLE [STRING, INTEGER] , then the compiler correctly fails the program.
The problem appears to be thatdetachable G is interpreted as attached when G is declared as an attached type. detachable should have an overriding effect, but in 6.6 it is not doing so. I don't know what ECMA has to say on this.
Conformance
Actually it appears to be a simple violation of the conformance rule.
ChangeHASH_TABLE to HASH_TABLE22 in the program above, and add the following class:
and the results are unchanged.
Hm. That is the conformance
Hm. That is the conformance rule. So it's not a violation of it. But perhaps it is the underlying problem.
Are you sure you are compiling against the void-safe version of EiffelBase and with all the void-safety settings properly set? If so, please send a problem report at http://support.eiffel.com with your project configuration file.
base-safe.ecf is the key
The key is that I failed to specify base-safe.ecf in my ECF library.
When I did this I got the expected compile error message.
I tried it in both default and compatible modes. Full Void safety was turned on. Are there any other options that need turning on to get full void safety (and if so, why?).