Re: class contract proposal finished

Paul Prescod <[email protected]>
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
Mark Hahn wrote:

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

Sorry. I lost track of that one.

> 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?   :-)

The problem isn't that you misunderstand it.

> 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 actually can't remember anyone ever saying that they don't use Python 
because of lack of Design By Contract. No mainstream language has Design 
By Contract. So who are these critics who will not program in anything 
without it?

Anyhow, if you really care about this buzzword, here's a good place to 
start:

http://www.digitalmars.com/d/dbc.html

"Contracts are a breakthrough technique to reduce the programming effort 
  for large projects. Contracts are the concept of preconditions, 
postconditions,  errors, and invariants."

 > ... 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.

First, I think it is somewhat dangerous to design language features just 
to shut people up. You can only do a good job on design when you are 
TRYING TO SOLVE A PROBLEM. When these people explain their problems to 
you in a manner that makes you understand why Prothon fails to meet 
them, you can design a class mechanism that will meet their needs.

Second, Prothon 1.0 doesn't have to solve world peace. If people look at 
it and complain that it doesn't have classes then talk to them to gather 
some requirements and put it in Prothon 1.1.

Third, if you want to shut people up then you should add curly braces 
instead of indentation. That's the most common bitch about Python. Lack 
of static type declarations is the second most common one.

  Paul Prescod
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.