Submitted by Jocelyn Fiat on Thu, 09/24/2009 - 05:48.
It is ok for me, and I would say, I hope we will remove this conversion
since this is the cause of many Call on Void target
when we have
s32: STRING_32
s8: STRING_8
s32 := Void
s8 := s32 -- We get a call on Void target here, since it is equivalent to s8 := s32.as_string_8
Personally I usually write the explicit conversion `.as_string_8' to avoid this kind of error.
Hopefully in Void-safe mode the compiler reports this as an error.
But in non void-safe mode, I find this case pretty annoying.
However, the user can still check all callers of `STRING_32.as_string_8' using the feature relation tool.
I am wondering, what about removing also the conversion from STRING_8 to STRING_32?
I understand from STRING_32 to STRING_8 the "content" will be "converted" to STRING_8, so we are potentially loosing information, but with the conversion from STRING_8 to STRING_32, we still have the "call on void target" issue, but not that critical thanks to Void safety.
Submitted by Emmanuel Stapf on Tue, 09/29/2009 - 18:17.
To have a good idea of the impact of such a removal, on EiffelStudio itself (6300 classes and about 2M lines of code) it gives a total of about 578 errors.
Comments
It is ok for me, and I would
It is ok for me, and I would say, I hope we will remove this conversion since this is the cause of many Call on Void target when we have
Personally I usually write the explicit conversion `.as_string_8' to avoid this kind of error.
Hopefully in Void-safe mode the compiler reports this as an error. But in non void-safe mode, I find this case pretty annoying.
However, the user can still check all callers of `STRING_32.as_string_8' using the feature relation tool.
I am wondering, what about removing also the conversion from STRING_8 to STRING_32? I understand from STRING_32 to STRING_8 the "content" will be "converted" to STRING_8, so we are potentially loosing information, but with the conversion from STRING_8 to STRING_32, we still have the "call on void target" issue, but not that critical thanks to Void safety.
In void safe mode, it is not
In void safe mode, it is not allowed to convert if the source is not attached, therefore it is not an issue.
To have a good idea of the
To have a good idea of the impact of such a removal, on EiffelStudio itself (6300 classes and about 2M lines of code) it gives a total of about 578 errors.