Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #4291

Also about Software reliability

From Sky89 <Sky89@sky68.com>
Newsgroups comp.programming.threads
Subject Also about Software reliability
Date 2018-05-18 21:06 -0400
Organization A noiseless patient Spider
Message-ID <pdntar$u7u$5@dont-email.me> (permalink)

Show all headers | View raw


Hello..


I wrote before this:

Also read this about Software reliability:

"Both Rust and Spark languages implement a number of static and dynamic
checks directly in the language definition. For example, they implement
strict-type safety; that is, objects can’t be implicitly converted from
one type to the next. The following doesn’t compile in SPARK"


Read more here:

http://www.electronicdesign.com/industrial/rust-and-spark-software-reliability-everyone


I think C++Builder has a good implementation of variants that allows
you to "emulate" much better strict-type safety of Rust and Spark,
i have looked to Boost variants and i think it is less powerful
than the one in C++Builder, here is how you have to extend
type-safety, you realize this solution with objects that contains 
variants that represent different types and the functions that work with 
them like Add and Multiply and Divide etc, here is the solution
for FreePascal and Delphi and C++Builder and you can extend
it, so i think FreePascal and Delphi and C++Builder are now acceptable 
for more reliability:

-- 

program test;

uses VARIANTS,SYSUTILS;

var f:double;
      a:integer;



FUNCTION ASSIGN(a,B:VARIANT):VARIANT;

begin

IF VARTYPE(A)=VARTYPE(B) THEN
BEGIN
A:=B;
RESULT:=A;
END
ELSE RAISE EXCEPTION.CREATE('ASSIGNEMENT NOT OK');


end;

begin

a:=2;

f:=a;

A:=ASSIGN(F,A);


end.
-- 


Here is the Vartype function:

http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/Variants_VarType.html




Thank you,
Amine Moulay Ramdane.


Back to comp.programming.threads | Previous | Next | Find similar | Unroll thread


Thread

Also about Software reliability Sky89 <Sky89@sky68.com> - 2018-05-18 21:06 -0400

csiph-web