Abstract:
The Nectar is a programming language that supports generics through its GenericsLibrary.
The GenericsLibrary provides a set of abstractions and utilities to define and manipulate generic types and functions.
Possible Implementation of N in Nectar:
impl N
{
let init()
{
return;
}
let dispose()
{
return;
}
let begin(let it)
{
let end := it._begin;
return end;
}
let end(let it)
{
let end := it._begin;
end += it._end;
return end;
}
let size(let it)
{
let sz := it._size;
return sz;
}
};
Properties of N and Y:
Let Y be a set of types with specific properties.
Let N be an object mapping functors to Y properties.
NShall provide functions to manipulateYgenerically.NMay be extended to support additionalYtypes and properties.
Let N(m) denote the instantiation of N for a specific Y type.
N(m)Shall be defined for allYtypesmthat satisfy the required properties
Author:
- Amlal El Mahrouss - amlal@nekernel.org