Open Collective
Open Collective
Loading
Malluscript V1.1.0 Released
Published on January 13, 2024 by Sreyas

What's Changed

  • Malluscript now support compound datatype called Lists.
  • Pseudo pass by reference support for compound datatypes
  • New operator: subscript operator `[]` - used to index values in Lists.
  • Support constant List expressions
  • New "arithmetic" operator behaviors when used with Lists.
  • New error type `IndexOutOfBounds`

Lists

Lists in Malluscript are similar to compound types in other mainstream programming languages. A list can have different type of primary data in it. An example usage of List would be:

x = [1,4,5,6,"malluscript"];
x = x + "more data";
i = 0;
i um 6 um onnallenkil avarthikuga {
    ezhuthuga x[i] + " ";
    i = i+1;
}

Using + operator along side a list data, will append the other operand into that list. List data can be accessed using subscript operators [ ]. Also unlike other datatypes when passed as an argument to a function, it will be passed as reference instead of passed as value.