Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19502 > unrolled thread
| Started by | Nathan Rice <nathan.alexander.rice@gmail.com> |
|---|---|
| First post | 2012-01-26 15:24 -0500 |
| Last post | 2012-01-26 15:24 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks Nathan Rice <nathan.alexander.rice@gmail.com> - 2012-01-26 15:24 -0500
| From | Nathan Rice <nathan.alexander.rice@gmail.com> |
|---|---|
| Date | 2012-01-26 15:24 -0500 |
| Subject | Re: Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks |
| Message-ID | <mailman.5136.1327609453.27778.python-list@python.org> |
On Thu, Jan 26, 2012 at 2:51 PM, Devin Jeanpierre <jeanpierreda@gmail.com> wrote: > Ooh, runtime turing-complete dependent-types. :) > > I'm not sure if you're aware of the literature on this sort of thing. > It's nice reading. A library such as this that's designed for it could > be used for static checks as well. Actually, that is kind of the direction I was going :) One of the nice things about Haskell is that the language is designed in a way that is conducive to proving things about your code. A side benefit of being able to prove things about your code is that in some cases you will be able to derive code just from well crafted specifications (like higher order Prolog). This isn't a game changer yet, but with advances in theorem proving software and a thoughtful language ontology, I could see it taking off very soon. Dijkstra was focused primarily on this area for the last 25 years of his life. > Probably deserves a better name than "constraintslib", that makes one > think of constraint satisfaction. As you can probably tell from my other projects, I'm bad at coming up with snappy names. > Any way to get them to raise a different error, such as ValueError (in > particular for preconditions)? Currently, no. I would like to add an event mechanism, or some kind of function hooks (ala Enthought Traits but much lighter). I'm sure I'll come up with something soon :) Nathan
Back to top | Article view | comp.lang.python
csiph-web