Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Christof Brass <brass@infopuls.com>
Subject: Re: Drop C/C++ better sooner than later
Date: Thu, 01 Mar 2001 01:39:42 +0000	[thread overview]
Message-ID: <3A9DA85E.36613E83@infopuls.com> (raw)
In-Reply-To: cCYm6.1296$CP4.299029@paloalto-snr1.gtei.net

Rick Cadruvi wrote:
> 
> "Christof Brass" <brass@infopuls.com> wrote in message
> news:3A9C2B88.8032D829@infopuls.com...
> > I don't think it is a good idea to come up with a list of
> > requirements and matching PLs because this will lead the
> > discussion quickly to certain aspects of these PLs instead of
> > talking about the big picture which is from my point of view:
> > can it be possible that something created in the early days of
> > our quick evolving area is still the best tool around?? Is C the
> > wheel of PL science and practice? Is flying impossible?
> 
> I disagree.  You stated that using C/C++ was stupid (or something
> to that affect) and that you couldn't write good code in it.  Therefore.
> naming other languages and their appropriate use is necessary for
> the discussion.  Since you won't suggest alternatives, you clearly
> demonstrate an anti C/C++ bias that must be more emotionally
> based than fact based.  I haven't even heard your objections to
> C/C++ except their age.

Not quite accurate. The age combined with the fact that we are in a business which is young compared to other professions like machine construction or architecture let me think that using this stone age tool couldn't be the best.
The objections against C and C++ are in general different although some of them pertain both.

Before we dive into that discussion I would like to ask you what are the properties/qualities/attributes a good PL should have or should avoid.

> 
> Believe me, I am NOT a defender of C.  

Unfortunately ;-)

>                                        There are many things I HATE
> about C.  Here's 4 of them:
> 
>         1. Case Sensitivity.  I am use to it, but I think it is a BIG
>            problem.  tmp, TMP, Tmp, tMp, tmP, TMp, tMP should NOT refer
>            to different things.

I like it and I don't like Pascal and Eiffel for the lack of case sensitivity. But this is mainly a matter of style, taste and cultural background. If you use a scripture which requires often to use uppercase letters depending of the semantics and sometimes even with different meaning if both ways are possible you will more likely vote for case sensitivity.

>         2. SWITCH/CASE doesn't auto-break.  I NEVER depend on being able
>            to fall through to the next CASE in a SWITCH statement.  The
>            default should be BREAK and allow specifying CONTINUE if you
>            want to drop through.  THIS IS A BIG PROBLEM!!!

You are perfectly right. This is one of the stupidest things preserved in Java from the C/C++ heritage.

>         3. BREAK.  Break should be allowed from ALL Begin/End ({})
>            constructs (including IF ELSE).  You should also be able to
>            BREAK # where # is the number of Begin/End blocks you want
>            to break out of.

I strongly disagree - at least with the second and third proposal, because this will inadvertantly lead to mistakes which are easy to overlook especially in other people's sources if the code is re-aranged and equipped with more nesting levels or other control sequences.

>         4. Use of "==" for compares.  It's WAY too easy to put in "="
>            instead.  In fact, I usually do a specialized search of ALL
>            my code before the first compile just to try and catch these.

You are perfectly right. This is one of the stupidest things preserved in Java from the C/C++ heritage.

> However, C is currently one of the most practical development languages
> because you have a large pool of people who know it and can be brought
> in to a project to work on it.  This is VERY important in commercially
> viable software.  Also, it is portable if the programmer isn't too careless.  
> You always have to assume your code will need to run on another platform/OS.

I don't agree. Firstly a good programmer can learn a good PL in a few days. I don't discuss the library question because this is a no issue (*all* good companies I know of wrote their own libraries and forbid the programmers to directly use the so called standard libraries because of bugs, not portable behaviour or missing functionality - a C library is something like God: a term which pretends that the denoted thing exists or has a specific quality but in fact doesn't exist or doesn't provide what it pretends).

Secondly, portability is a no issue. If you strive for portability you will have to solve a lot and very different problems than using a/the C/C++ library.

> My ideal language would probably be mostly a combination of BLISS and C.
> However, I do mostly tools and System programming.  Therefore, I am not
> probably the best sample case for what makes a good programming language.  
> However, I have done just about every kind of programming from Accounting 
> packages, to OS code to embedded systems to realtime.

Seems you a perfect test sample. I have to admit that I don't know BLISS a bit although I read some awkward comments in this NG related to the syntax. Not quite motivating. But I honor it as a main implementation language of VMS - it can't be that bad ;-)

> One thing I don't want is a language to get in the way.  A lot of newer
> languages are designed to prevent programmers for doing things to keep them 
> from making mistakes. I understand this logic, but what you have is an effort 
> to over compensate because programmers were never taught to program well and 
> they write BAD code.

While I partly agree I think it's more important what a language offers than what it prevents. PL design is always a compromise between power and complexity. Preventing from "stupid" mistakes or not to detect mistakes like the automatic type conversions in C++ is a good feature. Java is a better compromise if we only look at the "front end".

> In order for a language to be useable, they invariably provide some "backdoor"
> that allows you to do the things you really want to do.  As a result, those
> "backdoors" get abused.  Along comes someone else who says they have to
> do something new that removes that "backdoor".  As more code is written in
> the new language, it becomes clear that new "backdoors" have to be implemented
> because the language is preventing complex things from being done or at
> least is making them so difficult that they take too long.  This was always my
> problem with ADA.  Time to implement a project is VERY important.  It's one of the
> BAD things with C/C++ in terms of applications development.

While I completely follow your thread of thoughts I don't understand the last three sentences. What I understood is that you regard Ada as a PL which has too many safety belts slowing down development. But you stated that this is also a "BAD" thing with C/C++. From the previous sections and from my knowledge preventing the programmer from doing stupid things is *not* a major strength of C/C++.

Basically I disagree. Preventing the programmer from doing bad things in Ada didn't prevent the good programmer from beeing very fast. Ada offers a lot of powerful features which really speeds up implementation. This is a major lack of C - no powerful features.

> Progrmaming Languages are just part of the tool set programmers use to solve
> problems.  What we really do is we solve problems.  The code writing is
> merely a clerical function through which we express those solutions.

Agreed.

> Sure we should use better tools when they are there.  However, better
> programming languages will NEVER be a substitute for writing GOOD code.  
> The real problem we need to solve is making sure programmers learn how 
> to write code well to start with.

Agreed.

> That is NOT being taught in Universities.  

Disagreed. Depends on the university or technical school.

>                                            My own son is majoring in
> computer engineering and his professors DON'T have a clue how to write 
> GOOD code.  I am teaching him that and he is juggling writing GOOD code 
> with the CRAP the professors want.

Teach me! What is GOOD code/source?

> Hopefully he will learn from both and get the grades he wants and still be able to
> write GOOD code when he finally goes to work for someone.  However, his manager there won't
> have a clue either and will insist he write BAD code because he doesn't know how to
> write GOOD code and can't understand the benefits.

> How many times do you still hear programmers justify the requirement that
> all routines exit at the bottom, or insist it is more efficient to write 
> fewer large routines than many small routines to save a few routine calls.
> As long as this ignorance persists, all the GREAT new programming languages 
> won't solve the problem.

I never heard this. But I read that the automatic tools for assessing source quality have miserably failed and AFAIK they aren't around anymore. I personally think that we are still in a transition phase from art to science and writing good programs needs creativity and knowledge which cannot be measured.

> When I even think about using an ELSE statement, I force myself to justify
> it's use.
> Most programmers think using ELSEs is really great and liberally do nested
> IF then ELSEs.

They do right. Why shouldn't they?

> Teach programmers to write code well, and new progrmaming languages will
> evolve that help us solve the problems better and not ones that prevent us
> from doing things we shouldn't do in the first place unless they are REALLY
> required.
> 
> just my opinions,
> 
> Rick Cadruvi...

We shouldn't look at bad programmers or bad programming style. The best PL is a PL which allows the high quality programmer to write high quality programms in shortest time.

What is good program source?


  parent reply	other threads:[~2001-03-01  1:39 UTC|newest]

Thread overview: 168+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OF5876F951.ACBD5F93-ON032569FC.003E241B@ep-bc.petrobras.com.br>
     [not found] ` <87n1baae6s.fsf@prep.synonet.com>
2001-02-25 17:38   ` So what Are we meant to use on the 'desktop' Terry C. Shannon
2001-02-25 19:23     ` David Mathog
2001-02-26  1:18       ` Christof Brass
2001-02-26  1:59         ` Bill Todd
2001-02-26 12:49           ` Larry Kilgallen
2001-02-26 19:09             ` Rick Cadruvi
2001-02-26 20:47               ` Larry Kilgallen
2001-02-26 21:04               ` Bill Gunshannon
2001-02-27  0:07                 ` Christof Brass
2001-02-27  1:00                   ` Bill Todd
2001-02-27  1:26                     ` Drop C/C++ better sooner than later Christof Brass
2001-02-27  2:47                       ` Rick Cadruvi
2001-02-27  3:59                         ` JF Mezei
     [not found]                       ` <XyEm6.896$be1.355692@paloalto-snr1.gtei.neDistribution: world <wrCvgGxaSLv9@eisner.encompasserve.org>
2001-02-27 21:13                         ` Rick Cadruvi
2001-02-27 22:34                           ` Christof Brass
2001-02-28  1:36                             ` Rick Cadruvi
2001-02-28 13:48                               ` LJEB
2001-02-28 16:28                                 ` Rick Cadruvi
2001-03-01 11:54                                   ` LJEB
2001-02-28 14:22                               ` Bill Gunshannon
2001-02-28 14:33                                 ` John Reagan
2001-02-28 15:19                                   ` Jan Vorbrueggen
2001-02-28 16:42                                   ` Rick Cadruvi
2001-02-28 17:45                                     ` John Reagan
2001-02-28 14:58                                 ` Robert Deininger
2001-02-28 15:29                                   ` Jan Vorbrueggen
2001-02-28 16:55                                   ` Bill Gunshannon
2001-02-28 18:05                                     ` Bob Koehler
2001-03-01  9:07                                       ` Jan Vorbrueggen
2001-02-28 18:34                                     ` Larry Kilgallen
2001-02-28 23:10                                       ` Rick Cadruvi
2001-02-28 19:52                                     ` Robert Deininger
2001-03-01 14:21                                     ` Bob Koehler
     [not found]                                     ` <KForX+5U$4bOrganization: Encompasserve <ZDsZwRGKoAEm@eisner.encompasserve.org>
2001-03-01 15:16                                       ` Jan Vorbrueggen
2001-03-01 21:58                                         ` JF Mezei
2001-03-02 10:26                                           ` Alan Greig
2001-03-05 10:20                                             ` Jan Vorbrueggen
2001-02-28 20:19                                   ` JF Mezei
2001-03-01 13:52                                     ` Bill Gunshannon
2001-03-01 15:13                                       ` Jan Vorbrueggen
2001-03-01 16:05                                         ` Bill Gunshannon
2001-03-01 17:08                                         ` Robert Deininger
2001-03-01 17:47                                           ` Rick Cadruvi
2001-03-01 20:36                                             ` Paul Repacholi
2001-03-01 23:11                                             ` Christof Brass
2001-03-03 14:54                                             ` Jan Vorbrueggen
2001-03-06 19:24                                               ` Bill Gunshannon
2001-03-06 21:53                                                 ` Larry Kilgallen
2001-03-06 22:29                                                   ` David J. Dachtera
2001-03-07  0:33                                                   ` Brian Schenkenberger, VAXman-
2001-03-07  2:53                                                     ` Christof Brass
2001-03-07  3:27                                                       ` Robert Deininger
2001-03-07 14:33                                                       ` Bill Gunshannon
2001-03-07 14:21                                                 ` Jan Vorbrueggen
2001-03-13  7:49                                                 ` Fred Zwarts
2001-03-13 16:12                                                   ` John Reagan
2001-03-01 16:58                                       ` Robert Deininger
2001-03-01 21:45                                       ` JF Mezei
2001-03-01  3:40                                   ` Christof Brass
2001-03-01  5:52                                     ` Robert Deininger
2001-03-01  3:33                                 ` Christof Brass
2001-03-01  6:03                                   ` JF Mezei
2001-03-01 17:11                                     ` Rick Cadruvi
2001-03-01 23:28                                       ` Christof Brass
2001-03-01 23:47                                         ` Rick Cadruvi
2001-03-02 10:45                                           ` Paul Repacholi
2001-03-02 18:52                                             ` Rick Cadruvi
2001-03-03  1:42                                               ` Christof Brass
2001-03-02  1:11                                         ` Brian Schenkenberger, VAXman-
2001-03-02  5:06                                           ` Rick Cadruvi
2001-03-02 10:32                                           ` Brian Schenkenberger, VAXman-
2001-03-06 20:47                                             ` bob.marcan
2001-02-28 15:03                               ` Per Schr�der
2001-02-28 16:50                                 ` Rick Cadruvi
2001-02-28 17:48                               ` Bob Koehler
2001-02-28 18:26                                 ` Bill Gunshannon
2001-03-01 13:41                                 ` Bob Koehler
2001-02-28 18:22                               ` Larry Kilgallen
2001-03-01  1:39                               ` Christof Brass [this message]
2001-03-01  9:38                                 ` Jan Vorbrueggen
2001-03-01 17:20                                   ` Rick Cadruvi
2001-03-01 23:38                                     ` Christof Brass
2001-02-28 12:39                           ` Bill Gunshannon
2001-02-27 23:00                       ` Larry Kilgallen
2001-02-28  0:12                       ` Brian Schenkenberger, VAXman-
2001-02-28 13:56                         ` Bill Gunshannon
2001-02-28 15:11                           ` Jan Vorbrueggen
2001-02-28 16:31                           ` Rick Cadruvi
2001-02-28  2:14                       ` Larry Kilgallen
2001-02-28  2:46                       ` Bill Todd
2001-03-01  2:12                         ` Christof Brass
     [not found]                       ` <XyEm6.896$be1.355692@paloalto-snr1.gtei.neDistribution: world <009F8479.B6EC89DC@SendSpamHere.ORG>
2001-03-01  1:46                         ` Christof Brass
     [not found]                       ` <XyEm6.896$be1.355692@paloalto-snr1.gtei.neDistribution: world <5ABc4wgf5wcs@eisner.encompasserve.org>
2001-02-28  4:46                         ` Rick Cadruvi
2001-02-28  6:28                           ` Robert Deininger
2001-02-28  7:16                             ` JF Mezei
2001-02-28 16:05                               ` Rick Cadruvi
2001-03-01  2:46                               ` Christof Brass
2001-03-01  2:25                             ` Christof Brass
2001-02-28  7:08                           ` JF Mezei
2001-02-28  8:52                             ` Jan Vorbrueggen
2001-03-01  2:47                             ` Christof Brass
2001-03-01  6:37                               ` Nikita V. Belenki
2001-03-01 23:40                                 ` Christof Brass
2001-03-03 10:18                                   ` Nikita V. Belenki
2001-03-03 10:40                                     ` Christof Brass
2001-03-12  3:29                                       ` Mark Garrett
2001-03-12  4:05                                         ` Bob Willard
2001-03-12  8:02                                         ` Paul Repacholi
2001-03-15 14:13                                           ` Alan Greig
2001-02-28 13:39                           ` Bob Koehler
2001-02-28 16:11                             ` Rick Cadruvi
2001-02-28 20:00                             ` JF Mezei
2001-03-01  9:16                               ` Jan Vorbrueggen
2001-03-01 23:42                                 ` Christof Brass
2001-03-01 13:48                               ` Bill Gunshannon
2001-03-01 23:18                                 ` John Santos
2001-02-28 18:11                           ` Larry Kilgallen
2001-02-28 20:01                             ` Robert Deininger
2001-03-01  2:18                           ` Christof Brass
     [not found]                           ` <9hjmlkwyghte@eisner.encompasserve.org>
2001-02-28 17:59                             ` Bob Koehler
2001-02-28 18:31                               ` Bill Gunshannon
2001-03-01 15:40                               ` Bob Koehler
2001-03-01 18:10                               ` Larry Kilgallen
     [not found]                               ` <97Organization: Encompasserve <Y$aqbQdRtYFw@eisner.encompasserve.org>
2001-03-01 17:38                                 ` Rick Cadruvi
2001-03-01 18:53                                 ` Nikita V. Belenki
2001-03-02 13:13                               ` Bob Koehler
2001-03-02 13:24                               ` Bob Koehler
2001-02-28 23:08                             ` Larry Kilgallen
2001-03-01 13:50                             ` Bob Koehler
2001-03-01 13:54                             ` Bob Koehler
2001-03-01 15:12                               ` Jan Vorbrueggen
2001-02-28  8:46                         ` Jan Vorbrueggen
2001-03-01  1:56                         ` Christof Brass
2001-02-26 12:17       ` So what Are we meant to use on the 'desktop' Alan Greig
2001-02-25 19:51     ` VMS wanted list. Was: " Paul Repacholi
2001-02-25 20:45       ` VMS wanted list Terry C. Shannon
2001-02-25 22:44         ` Howard S Shubs
2001-02-26  0:37           ` Terry C. Shannon
2001-02-26  1:19             ` Eric Smith
2001-02-26  4:13             ` Howard S Shubs
2001-02-26  5:27               ` Terry C. Shannon
2001-02-26  6:38                 ` Howard S Shubs
2001-02-27  0:12                   ` Christof Brass
2001-02-27  3:22                     ` Terry C. Shannon
2001-02-27 22:37                       ` Christof Brass
2001-02-27 11:15                   ` Brian Schenkenberger, VAXman-
2001-02-27 22:37                     ` Christof Brass
2001-02-28  2:12                   ` Bob Kaplow
     [not found]                   ` <3A9AF0DB.Organization: What, me, organized? <rUslzcAE$7$5@eisner.encompasserve.org>
2001-03-12  2:49                     ` Mark Garrett
2001-03-12 13:52                   ` Bob Kaplow
2001-02-26 15:35                 ` Tim Llewellyn
2001-02-26 23:51                   ` Terry C. Shannon
2001-02-27  0:15                   ` Christof Brass
2001-02-26 11:27               ` Brian Schenkenberger, VAXman-
2001-02-27 21:43                 ` Terry C Shannon
2001-02-27 22:07                 ` Brian Schenkenberger, VAXman-
2001-02-26 19:16             ` Rick Cadruvi
2001-02-26  0:48           ` Christof Brass
2001-02-26 12:43         ` Larry Kilgallen
2001-02-26 13:02           ` Terry C. Shannon
2001-02-26 15:48           ` Jan Vorbrueggen
2001-02-26 16:47       ` VMS wanted list. Was: So what Are we meant to use on the 'desktop' Hoff Hoffman
2001-02-26 21:01         ` Bill Gunshannon
2001-02-27  0:19         ` Christof Brass
     [not found]           ` <97giah$jo3@gap.cco.caltech.edu>
2001-02-27 21:19             ` Rick Cadruvi
2001-02-27 22:44               ` Christof Brass
2001-02-28 16:37         ` VMS wanted list. Take II Paul Repacholi
2001-03-01  4:17           ` Christof Brass
read-only archive

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