From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLY autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.236.140.195 with SMTP id e43mr10375616yhj.48.1432303274329; Fri, 22 May 2015 07:01:14 -0700 (PDT) X-Received: by 10.140.81.144 with SMTP id f16mr127695qgd.9.1432303274315; Fri, 22 May 2015 07:01:14 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!z60no3213620qgd.0!news-out.google.com!k20ni44835qgd.0!nntp.google.com!z60no3212361qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 22 May 2015 07:01:14 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=78.27.123.114; posting-account=QrZwxQoAAAByl3YAWTpexAk3yBYyZMHn NNTP-Posting-Host: 78.27.123.114 References: <127b004d-2163-477b-9209-49d30d2da5e1@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Build language with weak typing, then add scaffolding later to strengthen it? From: kalvin.news@gmail.com Injection-Date: Fri, 22 May 2015 14:01:14 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2891 X-Received-Body-CRC: 556330630 Xref: news.eternal-september.org comp.lang.ada:25942 Date: 2015-05-22T07:01:14-07:00 List-Id: perjantai 22. toukokuuta 2015 15.57.07 UTC+3 J-P. Rosen kirjoitti: > Le 22/05/2015 13:29, kalvin.-nospamhere-news@gmail.com a =E9crit : > > Even C could be made more robust, if simple type checking is > > performed at compile time. For example, > >=20 > > typedef int apples; > >=20 > > typedef int oranges; > >=20 > > apples a =3D 5; oranges o =3D a; > >=20 > > should generate type check error as the types are definitely > > different types. Also, assigning enums to ints and ints to enums > > should be considered illegal. > >=20 > I don't agree. C is a low level language, and good at that. Its types > are those of the machine: bytes and addresses, the rest is a (small > quantity of) syntactic sugar. >=20 > If you need strong typing, use a strongly typed language. But don't > blame C for not being strongly typed, it was simply not part of the > requirements. >=20 > --=20 > J-P. Rosen > Adalog > 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX > Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 > http://www.adalog.fr What I heard, C is used in programming some operating systems. And C/C++ ha= s been even used for programming some serious large-scale applications - no= t very low level to me. I have also heard some rumours that quite often bug= s in C/C++ software are related to its non-existent type validation ;) Addi= ng some type checking wouldn't make it less suitable for low-level programm= ing. After 20 years in embedded C/C++ programming, I cannot say that it is = good even for low level programming because of the weak type checking. C/C+= + are the cancer of software engineering.