|
|
| Author |
Message |
< Erlang questions mailing list ~ Backward compatibility (Was: global_name_server question.) |
| patrickdlogan at home.com |
Posted: Thu Jun 03, 1999 9:13 am |
|
|
|
Guest
|
Peter Olin writes:
>
> There are many places in OTP where errors are "signalled" this
> way...
>
> "Backwards compatibility" has been the often mentioned reason for
> keeping a lot of the inconsistencies in the OTP libraries, but I
> really don't think that's an argument.
>
> What's the "public opinion" on revising and rewriting interfaces so
> that functions have some consistent use of "types", return values,
> EXIT reasons, etc.? There are many ways of keeping the system
> backwards compatible, without actively preventing improvements
> where there is a need for them. (New names for revised modules,
> forwarding of calls, compiler warnings, etc)
I don't have a lot of legacy code yet, so I am not too concerned
either way. In general I am willing to put up with some cruft in the
name of backward compatibility, as long as the fix is available
alongside the older stuff one way or another. I'd rather we not all
fix it ourselves N different ways.
That said, here is one cute way to fix it for now...
Assert = fun({ok, Result}) -> Result end.
copy1(File1, File2) ->
file:write_file("dot_login", Assert(file:read_file(".login"))).
--
Patrick D. Logan mailto:patrickdlogan_at_home.com
Post generated using Mail2Forum (http://m2f.sourceforge.net) |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|