Re: class contract proposal finished

"Mark Hahn" <[email protected]>
Newsgroups gmane.comp.lang.prothon.user
Message-ID <000501c4679a$1c5e8ec0$0d01a8c0@MarkVaio>
Paul Prescod wrote:
> Mark Hahn wrote:
>
>> http://prothon.org/wiki?pagename=DesignByContractClass
>>
>> This works pretty much the same way as the properties proposal.  It
>> lets the interpreter do all the work.
>
> Fundamentally I've never understood the problem you are trying to
> solve here. I've heard of Design By Contract but I don't understand
> what your proposal has to do with it. I've always thought of Design
> By Contract as being about Eiffel-style preconditions and
> postconditions.
>
>
http://www.google.com/search?hl=en&lr=&ie=UTF-8&safe=off&q=design+by+contract+python&btnG=Search
>
> It has pretty little to do with a bunch of static-style rules on
> assigning to properties of objects etc.
>
> Designing features to allow large-scale software engineering is
> difficult and I don't think it is something you do off the top of your
> head. You need an articulated theory about how large-scale engineering
> works and why traditional languages fall short. Then you design the
> features to fix the problems. But your DBC has no rationale about why
> specific restrictions would realistically make it easier to build
> large programs.
>
> If you go back to Eiffel, you'll see that in their minds it is
> basically about a) runtime testing and b) static declarations. Unit
> testing is also promoted by modern "agile programming" methodologies.
> They are probably complimentary mechanisms and could work together. A
> language could add explicit support for both to make it easier.

So you feel the DBC type/interfaces proposal is also hopeless?

Yes, DBC is a formidable challenge. I felt the same way about unicode but
I've got it in the language now.  Not understanding something has never
stopped me before.  Why should I let it now?   :-)

I will study up on it more.  All I know is that I have seen many people come
to c.l.p. and say they couldn't use Python because of lack of DBC, type
enforcement, etc.  I now predict a new one with Prothon, and that is "lack
of classes".  I want to have an answer for them to give to their
pointy-haired bosses.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.