Logo

Programming-Idioms

Declare a new list items of string elements, containing zero elements
New implementation

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.

Other implementations
(def items '())
#include <vector>
#include <string>
std::vector<std::string> items;
using System.Linq;
var items = Enumerable.Empty<string>();
using System.Collections.Generic;
var items = new List<string>();
var items = <String>[];
List<String> items = [];
character(len=:), allocatable, dimension(:) :: items
allocate (items(0),source="")
var items []string
var :: [String]
var = []
let items = [];
import java.util.*;
List<String> list = new ArrayList<>();
uses classes;
items := TStringList.Create;
my @items;
# or
my @items = ();
items = []
items = []
let items: Vec<String> = vec![];