[erlang-questions] "Design By Contract" in Erlang

Zabrane Mickael <>
Thu Jan 12 16:12:46 CET 2012


Thanks Tim.

I'll give "annotations" a try.

Regards,
Zabrane


On Jan 12, 2012, at 3:13 PM, Tim Watson wrote:

> And if you need to differentiate between pre/post more clearly in your annotation, you can do it like this too:
> 
> https://github.com/hyperthunk/annotations/blob/master/examples/simple/src/logging.erl
> 
> On 12 January 2012 14:11, Tim Watson <> wrote:
> You could easily write your own using https://github.com/hyperthunk/annotations
> 
> For some usage examples:
> 
> https://github.com/hyperthunk/rebar_annotations/blob/master/src/base_dir.erl
> https://github.com/nebularis/memoize/blob/master/src/memoize.erl
> 
> It would be easy to write the pre/post conditions as annotations and glue them in to the build using this.
> 
> On 12 January 2012 02:12, Zabrane Mickael <> wrote:
> Thanks Steve. But UBF is for protocol validation between Erlang and foreign languages.
> 
> But to simply check pre-conditions, post-conditions aroudn functions ... may be something simple exists!!!
> 
> Regards,
> Zabrane
> 
> On Jan 12, 2012, at 1:39 AM, Steve Davis wrote:
> 
> > If you've not seen it already, Joe Armstrong's UBF is worth studying:
> >
> > http://www.sics.se/~joe/ubf/site/home.html
> >
> >
> > On Jan 11, 3:19 pm, Zabrane Mickael <> wrote:
> >> Hi guys,
> >>
> >> Any Erlang library to simply DbC (à la Eiffel)?
> >>
> >> Regards,
> >> Zabrane
> >>
> >> _______________________________________________
> >> erlang-questions mailing list
> >> ://erlang.org/mailman/listinfo/erlang-questions
> > _______________________________________________
> > erlang-questions mailing list
> > 
> > http://erlang.org/mailman/listinfo/erlang-questions
> 
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120112/62bcd859/attachment.html>


More information about the erlang-questions mailing list