Vigil, the eternal morally vigilant programming language

  • Thread starter Alain Ketterlin
  • Start date
A

Alain Ketterlin

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

Chris Angelico

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
 
T

Terry Reedy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top