Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #4364
| 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 | Read again, i correct a typo |
| Date | Fri, 1 Jun 2018 17:54:11 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 80 |
| Message-ID | <pesfad$5gg$16@dont-email.me> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Fri, 1 Jun 2018 21:54:21 -0000 (UTC) |
| Injection-Info | h2725194.stratoserver.net; posting-host="6334c5a99ed7fedce43087d17037d597"; logging-data="5648"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19P+zuwynutVNUbF1V93zev" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
| Cancel-Lock | sha1:GcBwFSaAums4XTi3N2YoR28yrNY= |
| Content-Language | en-US |
| X-Mozilla-News-Host | news://news.eternal-september.org:119 |
| Xref | csiph.com comp.programming.threads:4364 |
Show key headers only | View raw
Hello..
Read again, i correct a typo:
About C++ and Delphi and ADA
As you know i have been programming with Delphi and with C++(i have
implemented many of my scalable algorithms in them) and
i am looking also at ADA and Rust, and what i have discovered
is that C++ is more weakly typed even with the SafeInt library that
i have presented to you here:
https://github.com/dcleblanc/SafeInt
For example you can still assign a type of char to an int type
in C++ and C and C++ and C allow also to assign two structs with some
different types in each one of them that can be assigned ! and this is
not allowed in Delphi and ADA for reliability reasons , because two
structs means two different "types" for Delphi and ADA, Delphi and ADA
don't even allow to assign two types of records(that means structs in
C++) that have the same elements with the same types ! but C++ and C
allow it.. so this is why i will stop from using C++ because C++ is less
reliable than ADA or Delphi in this strict-type safety, you can even use
"variants" that are implemented smartly in Delphi to enhance strict-type
safety(and thus reliability) in Delphi as i have showed you like the
following:
--
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
So i will stop coding in C++ and i will continu to code in Delphi
and i will also code in Java and Rust.
Thank you,
Amine Moulay Ramdane.
Back to comp.programming.threads | Previous | Next | Find similar | Unroll thread
Read again, i correct a typo Sky89 <Sky89@sky68.com> - 2018-06-01 17:54 -0400
csiph-web