Re: YAPL - Yet Another Programming Language
Adem24 wrote:
> 1) There is no goto statement.
> Hidden goto's like break- and continue-statements are also omitted.
>
> 2) There is no return statement.
> Instead a result variable can be declared to which the result of a function can be assigned.
Is the goal of this language to make the life of programmers as hard
as possible? Something like this becomes difficult to implement:
// Find the first value in 'data' which meets the requirements imposed
// by the parameter:
Type1 foo(Type2 value)
{
for(size_t i = 0; i < data.size(); ++i)
for(size_t j = 0; j < data[i].size(); ++j)
for(size_t k = 0; k < data[i][j].size(); ++k)
if(meetsRequirements(data[i][j][k], value)
return data[i][j][k];
}
|