I think this could lead to misunderstanding if you keep the BASIC 
concept of "free" indention:

> But if you want less keywords, you can do:
>
> PUBLIC '(a.k.a. Interface)
>    Age AS Byte
>
>    setAge(Value AS Byte)
>      IF Value>= MinAge AND Value<= MaxAge THEN Age = Value
>    END
>
> Because, I think than, a method (procedure or function) is defined by
> its signature, not by the prefix keywords FUNCTION, PROCEDURE or SUB.
>
> May be, you want to do optionals these keywords.
>

I can understand what you mean, but it's true what was said here 
earlier: Just imagine a few hundred codelines instead of these 3 in your 
example - at the end of the procedure (where your END stands) you maybe 
wouldn't know by heart if there was a PUBLIC somewhere or whatever.

If you want to get rid of the "bracketing" the keyword SUB does, you 
should either provide an intelligent editor which presents this piece of 
code as one piece (some color or whatever), or you come to a concept of 
indention like - what was it, Ruby?

But if you really want to get rid of something useless, why not change 
SELECT CASE into SELECT? I don't know the history of this keyword, but 
it smells like it was planned to allow for further combinations. 
However, nobody ever implemented them, and it stayed as it was. If we 
don't revive the old idea, why not allowing the programmer to write it 
like SWITCH? You could make it an option:

SELECT myExpression
CASE 0
CASE 1
CASE 2,3
CASE ELSE
END SELECT

Regards

Rolf

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to