What does HackerNews think of vigil?

Vigil, the eternal morally vigilant programming language

Language: Python

I always appreciate these languages. This reminds me of another one called Vigil that was also on Hacker News: https://github.com/munificent/vigil.

Similar to how there are some nice ideas in Ok?, Vigil had some some cool capabilities like the `implore` statement - a dynamic value check on function arguments.

This was the Hacker News thread for it https://news.ycombinator.com/item?id=5002597

The syntax is not the same.

This is an example from itzer/virgil [1]:

  def fib(i: int) -> int {
    if (i <= 1) return 1;
    return fib(i - 1) + fib(i - 2);
  }
And an example from munificent/vigil [2]:

  def fib(n):
    if n < 2:
        result = n
    else:
        result = fib(n - 1) + fib(n - 2)
    swear result >= 0
    return result
[1] https://github.com/titzer/virgil/blob/master/doc/tutorial/Me...

[2] https://github.com/munificent/vigil

Not to be confused with Vigil, an esolang by the great Munificent.

“It goes without saying that any function that throws an exception which isn't caught is wrong and must be punished.”

https://github.com/munificent/vigil

> I wonder how many people worry about supplying clang a file that doesn't end in a new line? That is undefined behaviour

It no longer is, since C++11. Check Phase 2.2 here: https://en.cppreference.com/w/cpp/language/translation_phase...

> clang won't delete your source file, even though it would be perfectly within its rights to.

UB allows the execution of the compiled program to wipe your hard drive, but it certainly does not give your compiler that right. I mean, the standard doesn't say what side effects invoking a compiler is allowed to have (because that's out of scope), so none of it can be predicated on UB.

(Mandatory mention: https://github.com/munificent/vigil)

This brings Vigil lang back to mind:

https://github.com/munificent/vigil

It's a programming language that erases any code that fails to meet contracts or throws an exception.

This reminds me of Vigil, "the eternal morally vigilant programming language" https://github.com/munificent/vigil
Someone should invent "immutable programming". A paradigm where you can't delete code.

It's a bit the opposite of Vigil, a programming language who punishes functions throwing errors.

https://github.com/munificent/vigil

I believe HN regular munificent has done some solid work on programming languages that can deal with abominable things: https://github.com/munificent/vigil Perhaps some lessons could be ported out of that into C++.
I like a lot your previous work on Vigil :)

https://github.com/munificent/vigil

"It goes without saying that any function that throws an exception which isn't caught is wrong and must be punished."

For those not familiar with munificent, you may recognize his moral conviction from one of his previous creations, Vigil: https://github.com/munificent/vigil