Thiago:

  Let me more-explicitly/completely state the rule
  that I use:

    1. Always use the canonical casing for an identifier.

    2. Don't create any other identifiers that differ
       from an existing canonical identifier only in
       their casing.

                                  Atlant


-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf 
Of Thiago Macieira
Sent: Wednesday, January 04, 2012 09:33
To: [email protected]
Subject: Re: [Development] Possible bug in signals and slots handling in QML.

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

This e-mail and the information, including any attachments, it contains are 
intended to be a confidential communication only to the person or entity to 
whom it is addressed and may contain information that is privileged. If the 
reader of this message is not the intended recipient, you are hereby notified 
that any dissemination, distribution or copying of this communication is 
strictly prohibited. If you have received this communication in error, please 
immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to