Towards generic code