Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
let items: Vec<String> = vec![];
(def items '())
var items = <String>[];
List<String> items = [];
character(len=:), allocatable, dimension(:) :: items
allocate (items(0),source="")
Note that all strings have the same length in an array.
var items []string
items is nil, which is idiomatic for an empty slice
var :: [String]
var = []
let items = [];
List<String> list = new ArrayList<>();
ArrayList implements the interface List.
my @items;
# or
my @items = ();
In Perl this is as close as you are going to get. "A list is a fixed collection of scalars. An array is a variable that holds a variable collection of scalars."
items = []