On Wednesday, 4 de January de 2012 07.51.48, Atlant Schmidt wrote:
> Thiago, et al.:
>
>   This is another one of those "don't play in the
>   grey areas of the language" things.
>
>   Even if identifiers are case-sensitive, one should
>   probably never depend upon that; why tempt fate?

"You should not depend on case sensitiveness" reads to me as "You can depend
on being case insensitive".

Does the following work?

Rectangle {
    property int foo: 0
    private signal bar

    onBar: FOO = 1
}

I recommend deprecating the capitalisation rule and introduce a non-mangling
construct, such as:

    on property(foo):
    on signal(bar):

The "on" keyword is already reserved anyway (SequentialAnimation on foo).

For signals, it would also be a good idea to name the arguments there, instead
of depending on magic variables appearing in your context. Think of

Rectangle {
    property string name
    signal nameChanged(string name)

    onNameChanged: { otherFunction(name); }
}

Which name was used there? Does the QML interpreter warn about shadowing, like
the C++ compiler can be asked to do?

I'm not saying this can't be solved by writing better code in the beginning,
but imagine that the signal and the property (which are public) already
existed in a previous version...

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to