We just updated our 14.05 development release to revision 14.05.9.4743. It includes a new tool, code name "Inspector Eiffel" and can be used to check your code against predefined rules.
The default Ubuntu/Debian install is valid for released version of EiffelStudio and it is using a special layout (more common to the Unix world).
To install the development version, you should use the more traditional approach documented at:
So download the 14.05 development version at:
and follow the instructions from the documentation site. Once done you should be up and running.
We are in the process of finalizing the release for the end of the month. The functional programming mechanisms described in some other discussions have been partially added to the compiler itself but because most users in the Eiffel community feels that having a compiler figure out the type automatically is not so great, we have instead adapted them to make the compiler smarter.
So in 14.05, we are adding a “Fix” facility which lets the compiler fix errors/warnings automatically upon the user requesting it. In 14.05, it will be limited to only two kinds:
- fix unused local variable
- fix missing type declarations for locals
In post 14.05, we will also propose fixing VEEN errors (unknown identifier) and many other errors such as fixing deferred routines without implementations, invalid feature redeclaration and many other things.
The current beta only has the `fix unused local variable’.
>We are in the process of finalizing the release for the end of the month. The functional programming mechanisms described in some other discussions have been partially added to the compiler itself but because most users in the Eiffel community feels that having a compiler figure out the type automatically is not so great, we have instead adapted them to make the compiler smarter.
I am most interested in generic features to enabled higher order functions, but am not an Eiffel user. For example (excuse my Eiffel, it has been 10 years),
map: (FUNCTION1[A, B]): MAYBE[B]
I can only guess this might be addressed in this release, the info I found is on the pages:
I would also look at how Eiffel represents closures, an example would be function composition as expressed in the PDF on the web page above.
There was no explicit link that this was addressed in this release, hence the assumption.
Does it really matter that you use MAYBE? In Eiffel thanks to Void-safety in many
cases you do not need optional types. However I understand that you simply want to
create a map routine that takes an agent (aka closure) to convert instances of A
into instances of B, but without having to specify the type of A and B.
To make this possible you would have to still declare the class completely:
MAP [G, H]
map (a_item: G; a_mapping: FUNCTION [ANY, TUPLE [G], H]): H
Result := a_mapping.item (a_item)
And somewhere in your code you will have:
b := c.map (a, agent convert_a_to_b)