-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Guys what is the formal name PRECONDITION or PRECONDITIONS that fnc must satisfy in order to work correctly?
>>> More
-
as seen on Programmers
- Search for 'Programmers'
I've been wanting to find a solid answer to the question of whether or not to have runtime checks to validate input for the purposes of ensuring a client has stuck to their end of the agreement in design by contract. For example, consider a simple class constructor:
class Foo
{
public:
Foo( BarHandle…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
It occurs to me that I could use use implicit conversions to both announce and enforce preconditions. Consider this:
object NonNegativeDouble {
implicit def int2nnd(d : Double) : NonNegativeDouble = new NonNegativeDouble(d)
implicit def nnd2int(d : NonNegativeDouble) : Double = d.v
def sqrt(n…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
These days I'm used to checking every single precondition for every function since I got the habit from an OS programming course back at uni.
On the other hand, at the software engineering course we were taught that a common precondition should only be checked once, so for example, if a function…
>>> More
-
as seen on Programmers
- Search for 'Programmers'
I've been a software developer for 8 years.
I've worked on about 20 projects, some smaller, some bigger.
I know how to help myself by using google magic, msdn, youttube, tutorials, how-to's etc.
I'm playing around with the idea to get a friend of mine (who has been a software-developer for 5 years)…
>>> More