[Haskell-cafe] Specify array or list size?

Antti-Juhani Kaijanaho antti-juhani at kaijanaho.info
Sat May 7 13:36:06 EDT 2005

On 20050507T093613-0700, Fergus Henderson wrote:
> On 07-May-2005, Hamilton Richards <ham at cs.utexas.edu> wrote:
> > As far as I know, the last programming language that included
> > arrays' sizes in their types was Standard Pascal,
> There have been many such languages since Standard Pascal.  For
> example C, C++, C#, Java, Ada, VHDL, and NU-Prolog.

C, C++ and Java do not belong to that list.  I can't speak about the
others, not being very familiar with them.

In C and C++, the declaration int n[50]; introduces an array variable
with size 50 having the type "array of int".  The size is *not* part of
the type.  In Java, the array size is not given in the declaration at
all (instead, it is given in the new expression), and is not part of the
Antti-Juhani Kaijanaho                  http://antti-juhani.kaijanaho.info/

		Blogi - http://kaijanaho.info/antti-juhani/blog/
                 Toys - http://www.cc.jyu.fi/yhd/toys/

More information about the Haskell-Cafe mailing list