# Design By Contract

- Thread: https://externals.io/message/22827
- Original archive: https://news-web.php.net/php.internals/22827
- Started by James Crane on 2006-04-18T10:27:32+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #22827 — James Crane — 2006-04-18T10:27:32+00:00

URL: https://externals.io/message/22827#22827

I've been reading and I discovered a concept called Design By
Contract. I've not seen any particular libraries to aid in this
particular development design process, but I was wondering if you
folks had, or if there were plans to consider providing for this
functionality within PHP. (A longshot, I know, but it's worth a shot.)

M.T.

---

## #22829 — Michael Wallner — 2006-04-18T11:10:08+00:00

URL: https://externals.io/message/22827#22829 · In reply to: #22827

James Crane wrote:
> I've been reading and I discovered a concept called Design By
> Contract. I've not seen any particular libraries to aid in this
> particular development design process, but I was wondering if you
> folks had, or if there were plans to consider providing for this
> functionality within PHP. (A longshot, I know, but it's worth a shot.)

Please refer to http://php.net/interfaces, http://php.net/spl and php-general@lists.php.net

Regards,
-- 
Michael - <mike(@)php.net> http://dev.iworks.at/ext-http/http-functions.html.gz

---

## #22835 — Sebastian Bergmann — 2006-04-18T15:26:44+00:00

URL: https://externals.io/message/22827#22835 · In reply to: #22827

James Crane schrieb:
> I've been reading and I discovered a concept called Design By
> Contract. I've not seen any particular libraries to aid in this
> particular development design process, but I was wondering if you
> folks had, or if there were plans to consider providing for this
> functionality within PHP.

 The only language that I know of that supports Design-by-Contract
 through language features is, of course, Eiffel.

 PHPUnit [1] supports [2] the same approach to Design-by-Contract that
 other Unit Test frameworks provide, too. But that would be a topic for
 another mailinglist.

 --
 [1] http://www.phpunit.de/
 [2] http://www.phpunit.de/pocket_guide/2.3/en/test-first-programming.html

-- 
Sebastian Bergmann                      http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69

---

## #22842 — Marcus Boerger — 2006-04-18T18:07:46+00:00

URL: https://externals.io/message/22827#22842 · In reply to: #22835

Hello Sebastian,

  interfaces are contracts as well as any signature is a contract.

marcus

Tuesday, April 18, 2006, 5:26:44 PM, you wrote:

> James Crane schrieb:
> > […]

>  The only language that I know of that supports Design-by-Contract
>  through language features is, of course, Eiffel.

>  PHPUnit [1] supports [2] the same approach to Design-by-Contract that
>  other Unit Test frameworks provide, too. But that would be a topic for
>  another mailinglist.

>  --
>  [1] http://www.phpunit.de/
>  [2] http://www.phpunit.de/pocket_guide/2.3/en/test-first-programming.html

> -- 
> Sebastian Bergmann                      http://www.sebastian-bergmann.de/
> GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69




Best regards,
 Marcus

---

## #22845 — Sebastian Bergmann — 2006-04-18T18:38:15+00:00

URL: https://externals.io/message/22827#22845 · In reply to: #22842

Marcus Boerger schrieb:
> interfaces are contracts as well as any signature is a contract.

 I know, but the term "Design by Contract" [1] means another kind of
 contract.

 --
 [1] http://en.wikipedia.org/wiki/Design_by_Contract

-- 
Sebastian Bergmann                      http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69
