News for hackers. Stuff that matters.
Re:Inside the JVM: Arrays by SeanLuke on Friday August 25, 2023 @08:58AM (#37261181)
An adjustable vector probably doesn't qualify as an "array" in the Java sense of the term: it's closer to an ArrayList. However Lisp is perfectly comfortable making zero-length simple-vectors, which are arrays in the Java sense.
Re:Inside the JVM: Arrays by lispm on Saturday August 26, 2023 @11:31AM (#37273757)
An ArrayList is not an Array?

> comfortable making zero-length simple-vectors

Btw., CL allows also zero-dimensional arrays:

  CL-USER 3 > (make-array '())
  #0ANIL
Re:Inside the JVM: Arrays by SeanLuke on Monday August 28, 2023 @04:31AM (#37291332)
> An ArrayList is not an Array?

Not in Java, no.

An ArrayList is an object which represents a variable length random-access list and does not support basic types (int, double etc.) An array is fixed-length and supports basic types. It is not an object per se.

The closest analog to an ArrayList in Lisp is an extensible vector, and the closest analog to an array is a simple-vector.

> Btw., CL allows also zero-dimensional arrays:

As any decent language would!