comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: Teaching C/C++ from Ada perspective?
Date: Tue, 3 Jul 2018 01:00:25 -0700 (PDT)
Date: 2018-07-03T01:00:25-07:00	[thread overview]
Message-ID: <2f5e4ce0-94e8-4b94-9da7-045ec90a9b22@googlegroups.com> (raw)
In-Reply-To: <3701bf07-89a5-4cb0-a704-5aebb589ca79@googlegroups.com>

> And I quote from you below [...] Of these, only your unspecified allusion to Pimpl

Actually, I didn't even have this idiom in mind (so again, don't put what I did not say in my mouth). I meant the general concept of having specifications and (possibly partitioned) implementations as separate physical artifacts. These concepts, at this general level, are shared and are common to both Ada and C++.

BTw - Pimpl solves a different problem (physical dependencies) and, interestingly, that problem exists in Ada as well. There is nothing that C++ lacks in this area when compared to Ada.

> Then in that paragraph, you switch to the negative

Because this was not the only reply in this thread. Others already suggested what to do and some of this I disagree with. I have listed traps to avoid.

> but never positively telling the OP what to actually teach

Wrong. Most of my post was a list of what to teach. Stop trolling, it's too cheap.

> The OP is yearning for: what portion of accesses and pools and subpools

He did not mention any of these in his question. That is, you are accusing me of saying things that I did not say, in reply to what OP did not ask about. It's a very poor trolling.

> can be brought over from Ada's wise memory management

The wise part of the memory management in Ada is that most of it need not be explicit. This is what makes Ada and C++ different from, say, Java, as both Ada and C++ are value-oriented instead of being reference-oriented. This is what I meant by saying that pointers can be avoided for a very long time. 

> That next paragraph is repeatedly telling OP what /not/ to do

Right. I stand by what I wrote. He should /not/ do what I have mentioned and I am fully aware that this opinion is not in line with what was already written in other replies.

> Negativity and embrace-the-pure-tried-&-true-party-line-C++-way was not what OP was requesting.

The OP asked what to do in order not to waste his time (did you read his post, actually? if not, do it now). And this is exactly what have I recommended.

> Overtly declaring the range of integers over which this portion of code operates can be a key portion of eliminating all variants of the overflow/overrun vuln(erabilitie)s that worms utilize as their attack vector to insert machine code.

I think you are having communication troubles. I have written: "don't confuse them with range-checked arrays".

> But never mind SEI software engineering principles, eh?

So can you kindly point me to where exactly SEI recommends defining integer range types in C++? They have a whole set of recommendations for C++. Can you point me to the right place, please?

My recommendation to OP was not to waste time. Please don't troll me, I don't want to waste mine, either.

> Here are some libraries for [...]

Yes. There are libraries for just about everything. But in the spirit of not wasting time (again, that's what OP asked for), don't show them all to students in the beginner course. They will find them later if they need them, but there is no reason to obstruct the presentation during the course that is devoted to algorithms (again, see what OP was asking about).

> Yeah right, C++ programmers haven't been yearning for Ada's strong typing on those “gazillion of incompatible types”, eh?

This is what I did some 12 years ago:

https://archive.is/9AmoJ

And I will repeat: Do Not Do This.

Don't troll. Don't put words into others' mouths. Read very carefully what you reply to. Let's keep this group a quality discussion place that it always was.

-- 
Maciej Sobczak * http://www.inspirel.com


  reply	other threads:[~2018-07-03  8:00 UTC|newest]

Thread overview: 117+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-30 18:04 Teaching C/C++ from Ada perspective? kouaoua16
2018-06-30 18:15 ` Luke A. Guest
2018-06-30 19:27   ` Dan'l Miller
2018-06-30 19:07 ` Dan'l Miller
2018-07-01 16:12 ` kouaoua16
2018-07-01 17:08   ` Luke A. Guest
2018-07-01 19:19     ` Dan'l Miller
2018-07-02  6:12       ` Maciej Sobczak
2018-07-01 20:52 ` Maciej Sobczak
2018-07-01 21:35   ` Dan'l Miller
2018-07-02  5:56     ` Maciej Sobczak
2018-07-02  9:58       ` Marius Amado-Alves
2018-07-02 11:03         ` Maciej Sobczak
2018-07-02 13:52           ` Marius Amado-Alves
2018-07-04 12:10             ` Dan'l Miller
2018-07-02 20:14         ` Paul Rubin
2018-07-03  9:48           ` Marius Amado-Alves
2018-07-04  2:52             ` Paul Rubin
2018-07-02 18:52       ` Dan'l Miller
2018-07-03  8:00         ` Maciej Sobczak [this message]
2018-07-03 12:40           ` Dan'l Miller
2018-07-03 20:54             ` Maciej Sobczak
2018-07-04  3:10               ` Dan'l Miller
2018-07-04  7:59                 ` Maciej Sobczak
2018-07-04  8:37                   ` Marius Amado-Alves
2018-07-04 12:22                     ` Maciej Sobczak
2018-07-04 14:13                       ` Simon Wright
2018-07-04 14:56                         ` Maciej Sobczak
2018-07-04 15:52                           ` Dmitry A. Kazakov
2018-07-04 16:24                             ` Alejandro R. Mosteo
2018-07-04 20:00                               ` Jeffrey R. Carter
2018-07-05 18:35                                 ` Randy Brukardt
2018-07-05 19:39                                   ` Jeffrey R. Carter
2018-07-06 18:45                                     ` Randy Brukardt
2018-07-04 20:13                             ` Maciej Sobczak
2018-07-04 21:09                               ` Dmitry A. Kazakov
2018-07-05  5:49                                 ` Maciej Sobczak
2018-07-05  7:37                                   ` Dmitry A. Kazakov
2018-07-05 13:14                                     ` Maciej Sobczak
2018-07-05 15:18                                       ` Dmitry A. Kazakov
2018-07-05 19:16                                       ` Randy Brukardt
2018-07-07 15:09                                         ` Lucretia
2018-07-05 19:12                                     ` Randy Brukardt
2018-07-05 20:10                                       ` Maciej Sobczak
2018-07-06 19:01                                         ` Randy Brukardt
2018-07-06 19:35                                           ` Dmitry A. Kazakov
2018-07-05  7:43                                   ` Alejandro R. Mosteo
2018-07-05 18:53                                   ` Randy Brukardt
2018-07-05 19:06                                     ` Dan'l Miller
2018-07-06 18:47                                       ` Randy Brukardt
2018-07-05 20:12                                     ` Maciej Sobczak
2018-07-06 18:51                                       ` Randy Brukardt
2018-07-06 19:43                                         ` Dmitry A. Kazakov
2018-07-06 20:18                                           ` Dan'l Miller
2018-07-07  8:39                                             ` Dmitry A. Kazakov
2018-07-07 11:53                                           ` Björn Lundin
2018-07-06 20:22                                         ` Maciej Sobczak
2018-07-06 23:26                                           ` Paul Rubin
2018-07-07  6:17                                             ` J-P. Rosen
2018-07-07  6:37                                               ` Micronian Coder
2018-07-07  8:48                                                 ` Privacy and child packages (Was: Teaching C/C++ from Ada perspective?) Jacob Sparre Andersen
2018-07-07 20:19                                               ` Teaching C/C++ from Ada perspective? Maciej Sobczak
2018-07-08 15:25                                           ` Simon Wright
2018-07-08 20:00                                             ` Maciej Sobczak
2018-07-09  9:04                                               ` Alejandro R. Mosteo
2018-07-05 15:30                               ` Dan'l Miller
2018-07-05 20:38                                 ` Maciej Sobczak
2018-07-05 21:05                                   ` Dan'l Miller
2018-07-05 18:47                               ` Randy Brukardt
2018-07-04 16:01                           ` Simon Wright
2018-07-04 17:12                           ` G. B.
2018-07-04 20:18                             ` Maciej Sobczak
2018-07-04 21:03                               ` G.B.
2018-07-04 17:21                           ` Dan'l Miller
2018-07-04 20:36                             ` Maciej Sobczak
2018-07-04 22:44                               ` Dan'l Miller
2018-07-05  2:01                                 ` Luke A. Guest
2018-07-05  5:03                                   ` Dan'l Miller
2018-07-05  5:58                                 ` Maciej Sobczak
2018-07-05 19:25                                   ` Randy Brukardt
2018-07-05 19:22                                 ` Randy Brukardt
2018-07-05 18:31                       ` Randy Brukardt
2018-07-06  3:32           ` Dan'l Miller
2018-07-06 12:05             ` Dan'l Miller
2018-07-06 20:42             ` Maciej Sobczak
2018-07-06 21:32               ` Dan'l Miller
2018-07-07 20:43                 ` Maciej Sobczak
2018-07-08 17:36                   ` Dan'l Miller
2018-07-08 18:39                     ` Bill Findlay
2018-07-08 19:28                       ` Dan'l Miller
2018-07-09 12:34                         ` Bill Findlay
2018-07-09 15:19                           ` Dan'l Miller
2018-07-09 19:34                             ` Bill Findlay
2018-07-09 22:03                               ` Dan'l Miller
2018-07-09 22:35                                 ` Bill Findlay
2018-07-10  1:56                                   ` Lucretia
2018-07-10 23:14                         ` Randy Brukardt
2018-07-11 14:05                           ` Dan'l Miller
2018-07-11 20:20                             ` Randy Brukardt
2018-07-08 20:43                     ` Maciej Sobczak
2018-07-08 23:17                       ` Dan'l Miller
2018-07-09  6:13                         ` Maciej Sobczak
2018-07-09 16:35                           ` Dan'l Miller
2018-07-10 23:20                       ` Randy Brukardt
2018-07-10 23:51                         ` Britt
2018-07-02 17:10   ` kouaoua16
2018-07-02 17:28     ` Dennis Lee Bieber
2018-07-02 18:22     ` Maciej Sobczak
2018-07-02 20:27     ` G.B.
2018-07-02  0:11 ` Paul Rubin
2018-07-02 14:26 ` kouaoua16
2018-07-02 19:57 ` G.B.
2018-07-02 20:17   ` Dan'l Miller
2018-07-03  9:56 ` Brian Drummond
2018-07-04 12:18 ` Olivier Henley
2018-07-04 14:17   ` kouaoua16
2018-07-12  5:38 ` robin.vowels
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox