News for hackers. Stuff that matters.
Re:Warning: Implicit Backdoor by noneeeed on Thursday September 05, 2019 @05:19AM (#20885116)
Range types were one of my favourite features of the Ada type system. Such a simple idea, but super effective, and really useful when doing static analysis. Being able to push constraints to the interface simplified a lot of things.
Re:Warning: Implicit Backdoor by account42 on Thursday September 05, 2019 @07:44AM (#20885707)
Something like that is what I am hoping we get with contracts when they make it into C++. Although the versions so far only add constraints to functions, having them on types as well sounds very useful.
Re:Warning: Implicit Backdoor by noneeeed on Friday September 06, 2019 @06:21AM (#20894431)
It's great. It allows you to push the responsibility for checking values are in type right out to the earliest point, reducing the need to sprinkle bounds checking code all over the place. If you are using static analysis like SPARK or one of the others, it then lets you do a load more of it automatically, the constraints it places on values makes it much easier to statically demonstrate runtime properties of the code before.