The low-level storage of the items.

Internally, there is two main configurations

One part: from head to tail (inclusive)

...0123...
   h  t

Two parts: from head to capacity-1, then from 0 to tail (both inclusive) Test with head > tail

345....012
  t    h

For consistency, length and index are used in the context of the sequence (self) and capacity and offset are used in the context of the native array.

Initially the native is not allocated, the first one is done with enlarge

Property definitions

core $ CircularArray :: native
	# The low-level storage of the items.
	#
	# Internally, there is two main configurations
	#
	# One part: from `head` to `tail` (inclusive)
	#
	# ~~~raw
	# ...0123...
	#    h  t
	# ~~~
	#
	# Two parts: from `head` to `capacity-1`,
	# then from `0` to `tail` (both inclusive)
	# Test with `head > tail`
	#
	# ~~~raw
	# 345....012
	#   t    h
	# ~~~
	#
	# For consistency, *length* and *index* are used in the context of the sequence (self) and
	# *capacity* and *offset* are used in the context of the native array.
	#
	# Initially the native is not allocated, the first one is done with `enlarge`
	private var native: NativeArray[E] is noautoinit
lib/core/collection/circular_array.nit:30,2--54,49