Re: What computer language is used a lot in the IT industry?

From: Robert STRANDH (strandh_at_labri.fr)
Date: 06/30/04


Date: 30 Jun 2004 06:58:35 +0200


"Thomas G. Marshall" <tgm2tothe10thpower@replacetextwithnumber.hotmail.com> writes:

> In what way does your first statement impact the second? You can use
> pointers in any language correctly. That was never countered. That has
> nothing to do with saying that the /removal/ of them helps limit errors.
>
> {sigh}. No one said that using pointers in C is an instance of coding
> incorrectly. I am saying that the removal of pointers (again, the way java
> does, they /have/ pointers, just not what you're used to) helps prevent
> incorrect coding.

But that is a very dangerous slippery slope in my opinion. And you
may very well throw out the baby with the bathwater when you try to
prevent such errors. There may be many ways of preventing programming
errors, some more radical than others. Just because introducing a
restriction fixes a problem does not mean it was the right restriction
to introduce. I was trying to pinpoint this error in reasoning by
showing that using pointers is NOT an instance of coding incorrectly,
and that therefore removing pointers (C-style, I know Java has
pointers) may have been overkill. [I can't believe I am arguing in
favor of C-style pointers. After all, the language I use most often
has the same restriction as Java in this respect].

For instance :

  * Some people abuse the C preprocessor. Conclusion, let us remove
    macros all together. Sure that fixes the abuse, but also makes it
    impossible to use syntactic abstractions. Perhaps the real
    problem (i.e., that the preprocessor does textual substitution)
    should have been fixed instead.

  * Some people get confused with multiple inheritance as defined by
    C++. Conclusion, let us remove multiple dispatch. Again, that
    fixes the confusion, but also removes a great programming
    technique (mixins). Why not fix the real problem (I am not sure
    what it is, perhaps that the semantics are not well defined in
    C++?)

  * and so on

-- 
Robert Strandh
---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------


Relevant Pages

  • Re: What is the advantage of C?
    ... This is a history lesson from my personal experiences. ... I've programmed in a number of languages: ... 1) ease of programming and 2) pointers (which correspond to ... PL/1, a precursor to Pascal, was basically Pascal (with pointers, like C), ...
    (comp.lang.c)
  • Re: Is it possible to use the value of the PROGRAM ID within the source code?
    ... > Structured Programming back then. ... Why has it been ignored by the Cobol ... > mainframe shops have Programming Standards prohibiting progress? ... replaced pointers with objects. ...
    (comp.lang.cobol)
  • Re: java.lang.NullPointerException
    ... C is a great language for writing an operating system kernel. ... > probably called pointers, or smart pointers, and then to make it clear ... > install java. ... > Coaching, problem solving, economical contract programming. ...
    (comp.lang.java.programmer)
  • Re: What computer language is used a lot in the IT industry?
    ... > And a large amount of code is written in C using pointers WITH such. ... Strange, I *never* considered production programming ...
    (comp.programming)
  • Re: A little disappointed
    ... >> Pointers aren't too mysterious or difficult. ... If you practise ... > programming errors. ... has not been involved in the implementation language decision ...
    (alt.comp.lang.learn.c-cpp)