Logo

Programming-Idioms

  • Rust
  • Php
$n = count($x);

PHP lacks a native list container, instead it uses a container called an "array" that is actually an ordered map.
let n = x.len();

with Ada.Containers.Vectors;
use Ada.Containers;
N : Count_Type := X.Length;

New implementation...
< >
programming-idioms.org