Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Vigil, the eternal morally vigilant programming language (http://www.velocityreviews.com/forums/t956259-vigil-the-eternal-morally-vigilant-programming-language.html)

Alain Ketterlin 01-07-2013 04:01 PM

Vigil, the eternal morally vigilant programming language
 

I just came across Vigil, an extension to python for serious software
engineers, at https://github.com/munificent/vigil and thought everybody
in this group would be interested (sorry if it has been announced
before).

From README:

| Vigil is a very safe programming language, and an entry in the January
| 2013 PLT Games competition.
|
| Many programming languages claim to take testing, contracts and safety
| seriously, but only Vigil is truly vigilant about not allowing code
| that fails to pass programmatic specifications.

Enjoy.

-- Alain.

Chris Angelico 01-07-2013 04:08 PM

Re: Vigil, the eternal morally vigilant programming language
 
On Tue, Jan 8, 2013 at 3:01 AM, Alain Ketterlin
<alain@dpt-info.u-strasbg.fr> wrote:
>
> I just came across Vigil, an extension to python for serious software
> engineers, at https://github.com/munificent/vigil and thought everybody
> in this group would be interested (sorry if it has been announced
> before).


It's the logical derivation of the principle that every program, once
written, could be shortened by at least one instruction and contains
at least one bug. From that, you can deduce that every program can be
logically reduced to a single instruction that doesn't work.

Vigil assists you with this logical reduction.

ChrisA

Terry Reedy 01-08-2013 08:12 AM

Re: Vigil, the eternal morally vigilant programming language
 
On 1/7/2013 11:01 AM, Alain Ketterlin wrote:
>
> I just came across Vigil, an extension to python for serious software
> engineers,


I hope that last part comes from a sense of humor.

> at https://github.com/munificent/vigil and thought everybody
> in this group would be interested (sorry if it has been announced
> before).
>
> From README:
>
> | Vigil is a very safe programming language, and an entry in the January
> | 2013 PLT Games competition.
> |
> | Many programming languages claim to take testing, contracts and safety
> | seriously, but only Vigil is truly vigilant about not allowing code
> | that fails to pass programmatic specifications.


While the language is a joke (Procrustes would be a somewhat better
name), the example illustrates the near uselessness of contract
checking, at least for functions. The example fib(n) function 'swears'
that the answer is a count (not negative). Ha, ha, very funny. A simple
'return 0' would satisfy that useless contract*. A correct fib(n)
function must actually calculate fib(n), and in practice, that is not
possible to check. Even checking that sorted(iterable) is correct
(outside a test situation) is harder than it might first seem#.

* In any of the many languages that use biased residue classes as a
substitute for real integers, positive + positive = positive is not so
trivial. So the function must return a negative to signal bad input or
raise an exception either directly or by an input condition. The
advantage of the directly exception is that the exception message can be
tailored to the audience and situation. [Vigil would simply excise the
calling function.]

# Given sorted(iterable) where iterable gets some number of comparable
items from stdin, how is the contract checker to determine that the
output is indeed a permutation of the unmutated input items, before
checking that they are are actually sorted.

--
Terry Jan Reedy



All times are GMT. The time now is 10:27 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.