Re:Pyret: A new programming language from the creators of Ra...
by catwell on Tuesday November 12, 2013 @09:46AM
(#6718085)
Those refinements are nice. Pre- and Post- conditions are illustrated, is there any way to describe an invariant?
Also, maybe you should have called them something else since a lot of people will think about completely different when they hear this word... (http://www.ruby-doc.org/core-2.0.0/doc/syntax/refinements_rd...)
Re:Pyret: A new programming language from the creators of Ra...
by draegtun on Wednesday November 13, 2013 @08:46AM
(#6725081)
re: refinements nomenclature...
Rebol got there first though! - http://www.rebol.com/r3/docs/datatypes/refinement.html
Matz is known to like Rebol - https://twitter.com/matz_translated/status/25061436079433318...
That's why Pyret has both tests and contracts (for now, in the form of refinements). This is a distinction that has been explored extensively in Racket also, all fully aware of Eiffel DBC.