Yes, they work well as they belong to different code scopes. You can access them by first.the_same
and second.the_same
.
[...] Scope is an important component of name resolution, which is in turn fundamental to language semantics. Name resolution (including scope) varies between programming languages, and within a programming language, varies by type of entity. Together with namespaces, scoping rules are crucial in modular programming, so a change in one part of the program does not break an unrelated part. [...]