Vigil: A programming language with eternal moral vigilance
41–50 of 120 posts
Re: Vigil: A programming language with eternal moral vigilance
#42I should note that an ordinary contract system does not delete your code...
[1] http://en.wikipedia.org/wiki/Eiffel_(programming_language)#D...
[2] http://www.eecs.northwestern.edu/~robby/pubs/papers/ho-contr...
Re: Vigil: A programming language with eternal moral vigilance
#43Re: Vigil: A programming language with eternal moral vigilance
#44To make this actually useful, instead of deleting bad functions, it's probably better to make the offending functions throw a special exception when they are called, signaling the calling of a function known to be bad. This way, you can still inspect the code for the offending functions and fix the bugs. Otherwise, the original code could just totally disappear after multiple runs. What good is non-buggy code if it d…
I believe this would make it no different from an 'assert'.
Re: Vigil: A programming language with eternal moral vigilance
#45To make this actually useful, instead of deleting bad functions, it's probably better to make the offending functions throw a special exception when they are called, signaling the calling of a function known to be bad. This way, you can still inspect the code for the offending functions and fix the bugs. Otherwise, the original code could just totally disappear after multiple runs. What good is non-buggy code if it d…
Re: Vigil: A programming language with eternal moral vigilance
#46I hope someone makes a C/C++ compiler that deletes functions from the source code when they trigger undefined behaviour. It would still be compliant with the standard.
This compiler would probably delete all the code. See http://blog.regehr.org/archives/761
But only user code is required to be well-formed and have defined behavior, system headers could just as well be written in Forth as long as the actual behavior under the compiler they come with is correct.
Re: Vigil: A programming language with eternal moral vigilance
#47To make this actually useful, instead of deleting bad functions, it's probably better to make the offending functions throw a special exception when they are called, signaling the calling of a function known to be bad. This way, you can still inspect the code for the offending functions and fix the bugs. Otherwise, the original code could just totally disappear after multiple runs. What good is non-buggy code if it d…
Re: Vigil: A programming language with eternal moral vigilance
#48Re: Vigil: A programming language with eternal moral vigilance
#49Re: Vigil: A programming language with eternal moral vigilance
#50To make this actually useful, instead of deleting bad functions, it's probably better to make the offending functions throw a special exception when they are called, signaling the calling of a function known to be bad. This way, you can still inspect the code for the offending functions and fix the bugs. Otherwise, the original code could just totally disappear after multiple runs. What good is non-buggy code if it d…
How will functions learn to stay in line if the compiler doesn't make an example every now and then? On a serious note, what you're thinking of is contracts, like so[0] [0] http://disnetdev.com/contracts.coffee/