Safe boolean
Nov. 29th, 2012 05:25 pmI promised to post about safety.
IEC61131-3 (Dialect of Pascal heavily used for programming industrial PLCs/robots) is evolving standard. Object Oriented extensions were added not too long ago (exactly when OO fashion faded and was replaced by functional programming fashion).
For organization behind this language standard developing correct programs in this language is big thing. Some parts of applications are related to safety features that must be very robust.
So how do you change Pascal to facilitate development of safety applications? The decided to add new data types:
In addition to plain old BOOL they add SAFEBOOL. INT and SAFEINT!! etc.
This will definitely make programmers write less buggy code :) (trollface)
Actually I think this might work. As Pascal is strongly typed, using SAFE types for any safety related operation will make it easier to reason about application correctness, taking into account only the subset of it where SAFExxx types are used.
IEC61131-3 (Dialect of Pascal heavily used for programming industrial PLCs/robots) is evolving standard. Object Oriented extensions were added not too long ago (exactly when OO fashion faded and was replaced by functional programming fashion).
For organization behind this language standard developing correct programs in this language is big thing. Some parts of applications are related to safety features that must be very robust.
So how do you change Pascal to facilitate development of safety applications? The decided to add new data types:
In addition to plain old BOOL they add SAFEBOOL. INT and SAFEINT!! etc.
This will definitely make programmers write less buggy code :) (trollface)
Actually I think this might work. As Pascal is strongly typed, using SAFE types for any safety related operation will make it easier to reason about application correctness, taking into account only the subset of it where SAFExxx types are used.