Re: Fortran vs. C (was Re: Ken & Klaus.)

From: Shmuel (Seymour J.) Metz (spamtrap_at_library.lspace.org.invalid)
Date: 09/24/04


Date: Fri, 24 Sep 2004 09:50:12 -0300

begin In <3064b51d.0409211439.6e7a3bc3@posting.google.com>, on
09/21/2004
   at 03:39 PM, beliavsky@aol.com said:

>I wonder if an applications programming language (as opposed to a
>systems language like C) needs C-like pointers. Fortran 90 does have
>something called POINTER, but it is more high-level than that of C.
>Do any of Ada, (Visual) Basic, Java, Perl, Python etc. have C-like
>pointers?

Ada has access types, which are typed pointers.

PL/I started out with C type pointers (although it didn't have the
confusion between pointers and arrays), but that's now only in the
language for compatibility; new programs are supposed to use handles,
which are typed.

Perl has dynamic typing and a reference can point to anything, but the
usage is too restricted to have the types of problems that you have
with C. A reference to an array does not allow you to access beyond
the end of the array, although it does allow you to add elements.

-- 
Shmuel (Seymour J.) Metz, SysProg and JOAT  <http://patriot.net/~shmuel>
Unsolicited bulk E-mail subject to legal action.  I reserve the
right to publicly post or ridicule any abusive E-mail.  Reply to
domain Patriot dot net user shmuel+news to contact me.  Do not
reply to spamtrap@library.lspace.org


Relevant Pages

  • Re: Fortran vs. C (was Re: Ken & Klaus.)
    ... >systems language like C) needs C-like pointers. ... Ada has access types, which are typed pointers. ... the end of the array, although it does allow you to add elements. ...
    (comp.os.linux.development.apps)
  • Re: Differance between Array and Pointers
    ... Well, except that arrays tend to be much larger than pointers, and the ... An array is a contiguous region of memory containing N elements of M ... indexing vs. a loop). ...
    (comp.arch.embedded)
  • [RFCv2][PATCH] flexible array implementation
    ... I call it a flexible array. ... storage for pointers to the second level. ... all locking must be provided by the caller. ... make sure to pass in &ptr instead of ptr. ...
    (Linux-Kernel)
  • Re: [RFCv2][PATCH] flexible array implementation
    ... I call it a flexible array. ... storage for pointers to the second level. ... all locking must be provided by the caller. ... make sure to pass in &ptr instead of ptr. ...
    (Linux-Kernel)
  • [RFC][PATCH] flexible array implementation v4
    ... I call it a flexible array. ... so never does an order>0 allocation. ... storage for pointers to the second level. ... all locking must be provided by the caller. ...
    (Linux-Kernel)