Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] equals() in AST nodes

Hi Michael,

It's OK, but methods should not be declared as 'final'.

Best regards,
Andrei Sobolev.

----- Original Message -----
From: "Michael Spector" <spektom@xxxxxxxxx>
To: "DLTK Developer Discussions" <dltk-dev@xxxxxxxxxxx>
Sent: Wednesday, June 10, 2009 8:28:18 PM GMT +06:00 Almaty, Novosibirsk
Subject: [Dltk-dev] equals() in AST nodes

Hi All,

Is there any reason to have equals() methods in basic AST nodes implemented in DLTK core? 
I guess it ASTNode should have the following to disallow weird and useless implementations of equals() in class hierarchy:

public final boolean equals(Object obj) {
return this == obj;
}

public final int hashCode() {
return super.hashCode();
}

What do you think?

Thanks,
Michael

_______________________________________________ dltk-dev mailing list dltk-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/dltk-dev

Back to the top