By: Max (max.delete@this.a.com),
Room: Moderated Discussions
D.P. (nospam@nospam.com) on 6/9/10 wrote:
---------------------------
>Max (max@a.com) on 6/9/10 wrote:
>---------------------------
>>
>>It's been done, but the idea hasn't caught on.
>>
>>http://deputy.cs.berkeley.edu/manual.html
>
>making C type-safe is hardly a new idea. It was attempted a few times before. Here is one of most noticeable attempt: http://en.wikipedia.org/wiki/Cyclone_%28programming_language%29
>but I seriously doubt that any such a language will ever wildly used. The C language was not designed to be 100% type-safe and any attempt to make it so is doomed. If you want type-safety, you need another language, and in any case, it does not buy much for writing low-level stuff like Linux kernel. And if you want more static checking to catch some bugs, you will be far better off with something like sparse checker: http://www.celinuxforum.org/CelfPubWiki/Sparse
Deputy is not an attempt to make C 100% memory safe (which I agree is doomed, or at least doomed to end up not being C). It simply allows you to be explicit about, for example, array sizes, by tying a pointer to a size. This enables efficient dynamic bounds checking. It will not catch all misuses of pointers, however.
Max
---------------------------
>Max (max@a.com) on 6/9/10 wrote:
>---------------------------
>>
>>It's been done, but the idea hasn't caught on.
>>
>>http://deputy.cs.berkeley.edu/manual.html
>
>making C type-safe is hardly a new idea. It was attempted a few times before. Here is one of most noticeable attempt: http://en.wikipedia.org/wiki/Cyclone_%28programming_language%29
>but I seriously doubt that any such a language will ever wildly used. The C language was not designed to be 100% type-safe and any attempt to make it so is doomed. If you want type-safety, you need another language, and in any case, it does not buy much for writing low-level stuff like Linux kernel. And if you want more static checking to catch some bugs, you will be far better off with something like sparse checker: http://www.celinuxforum.org/CelfPubWiki/Sparse
Deputy is not an attempt to make C 100% memory safe (which I agree is doomed, or at least doomed to end up not being C). It simply allows you to be explicit about, for example, array sizes, by tying a pointer to a size. This enables efficient dynamic bounds checking. It will not catch all misuses of pointers, however.
Max


