Afficher un message
Vieux 30/06/2008, 17h43   #1
Juha Nieminen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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];
}
  Réponse avec citation
 
Page generated in 0,04458 seconds with 9 queries