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

Gianfranco Alongi gianfranco.alongi@REDACTED
Thu Jan 12 17:03:48 CET 2012


Also, you can typespec everything rigorously and dialyze, not dbc per se,
but gives you great confidence that it fits together nicely.
On Jan 12, 2012 4:17 PM, "Zabrane Mickael" <zabrane3@REDACTED> wrote:

> 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 <watson.timothy@REDACTED> 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 <zabrane3@REDACTED> 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 <zabra...@REDACTED> wrote:
>>> >> Hi guys,
>>> >>
>>> >> Any Erlang library to simply DbC (à la Eiffel)?
>>> >>
>>> >> Regards,
>>> >> Zabrane
>>> >>
>>> >> _______________________________________________
>>> >> erlang-questions mailing list
>>> >> erlang-questi...@REDACTED://
>>> erlang.org/mailman/listinfo/erlang-questions
>>> > _______________________________________________
>>> > erlang-questions mailing list
>>> > erlang-questions@REDACTED
>>> > http://erlang.org/mailman/listinfo/erlang-questions
>>>
>>> _______________________________________________
>>> erlang-questions mailing list
>>> erlang-questions@REDACTED
>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>
>>
>>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120112/9e51bd2d/attachment.htm>


More information about the erlang-questions mailing list