2010/9/17 Rolf-Werner Eilert <[email protected]>:
> 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.

Ok, you can put a END (or whatever) keyword to close the initial
PUBLIC. But, I think that the PUBLIC keyword ends when the PRIVATE
keyword appears or at the end line, and PRIVATE ends at the end line.
Anyway, if a class have a few hundred of lines, possibily the problem
is a bad modularizing.

> 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?

I'm not proposing that Gambas imitate to Haskell/Python on using
indentation to delimit structures.

> 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

I agree. But I think that is less important, because not have a major impact.

-- 
Fabián Flores Vadell
www.speedbooksargentina.blogspot.com

------------------------------------------------------------------------------
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