Re: [Vala] A few questions



Jamie McCracken wrote:
Ranges is something I would like very much to add to Genie

I believe Jurg said he would support ranges at some point. Dont expect
too many vala features prior to version 1.0 though  as his time will no
doubt be spent fixing bugs


I don't know about for arrays, but I'd love to see ranges as well as
multiple value cases allowed in switch statements, however it ends up
being done, if that's different from what you meant. e.g.

switch(x)
{
  case 1 to 30:
    x=5; break;
  case 35, 45, 100, 456: /*This multiple item case should work with
strings and objects, too, I think.*/
    x=6; break;
  default:
    x=-1; break;
}


Also (kind of off topic, but while we're throwing around ideas—), I
don't suppose anyone's ever thought about making else statements
functional in conjunction with while loops, have you? While loops
express conditions just like if statements, and they can be false the
first time through—why not allow an else statement to deal with that
case? It would save some coding redundancy in some cases, I've found.
While we're at it, we could make else while statements, too. Of course,
the else while statements would be loops, while the else statement would
 be once, as with an if else. Also, why not allow for else ifs after a
while? Of course, we might want to change the syntax a little for these
cases, as it might confuse people otherwise.

What are your thoughts?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]