Design-by-contract systems enforce API behavior. In Eiffel, contracts specify both internal and external behavior, at the language level.
connect_to_server (server: SOCKET)
require
server /= Void and then server.address /= Void
-- etc.
end
This does what it looks like, at runtime. (/= == != :)
The cost of doing the same in Java is higher; most frameworks use some form of aspect-oriented
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment