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


Groups > comp.programming.threads > #4291

Also about Software reliability

Path csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From Sky89 <Sky89@sky68.com>
Newsgroups comp.programming.threads
Subject Also about Software reliability
Date Fri, 18 May 2018 21:06:35 -0400
Organization A noiseless patient Spider
Lines 79
Message-ID <pdntar$u7u$5@dont-email.me> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Sat, 19 May 2018 01:06:35 -0000 (UTC)
Injection-Info h2725194.stratoserver.net; posting-host="6f94b6e509dff52dedc1c2c93682a33f"; logging-data="30974"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ONcbS1YpOJBrxtx3fbGAZ"
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
Cancel-Lock sha1:ICXytq4slFVuAqcc+8d4+OUUiVs=
Content-Language en-US
X-Mozilla-News-Host news://news.eternal-september.org:119
Xref csiph.com comp.programming.threads:4291

Show key headers only | 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