Does Perl 6 support design by contract?

It is listed as a language with native DbC support on Wikipedia next to Eiffel and Spe #, but I can not find references in the documentation or in the test suite.

+6
source share
1 answer

2019 Update

Imo, no.

Since I don’t think 6.d “implements most of the DbC functions initially” to reasonably define “majority”, I removed it from the Wikipedia Design by Contract page .

(If you think that it should be returned to the original section, despite this SO and my notes above and below, make sure that it is displayed in alphabetical order.)

I think:

  • P6 , " DbC".

  • . ( , " ".)

, , .

1. / //:

  • (, , ) / PRE , , / POST " ".

  • " ". ( ), , " ", -, callsame callsame. , "" , . " ", PRE POST? , .

  • /. , , OO::Actors , , . , , DbC, / PRE " " , / POST .

  • PRE POST. PRE POST , , . S04 :

, PRE POST , . ClassHOW.

, PRE POST. , 25 , , .

PRE POST S04-/pre-post.t. TODO.

, , (, - P6) , , , , TODO , , :

  • , ", DbC". , "" . P6 ( "") DbC ? , , , .

  • , P6 DbC , , , "DbC" "Design by Contract" doc doc. (, , , , , ?)

  • PRE POST , DbC. , , P6 wazoo, p6doc, , . ! , , PRE POST, , , , . :)

+5
source

Source: https://habr.com/ru/post/1682054/


All Articles