Mailinglist Archive: yast-devel (53 mails)

< Previous Next >
Re: [yast-devel] Never include anything in global namespace
On Fri, Feb 28, 2014 at 03:41:14PM +0100, Josef Reidinger wrote:

I just would like to remind that noone should include/extend anything to
global namespace in his ruby code. It affects clients, modules, libs and also
includes. The most visible part is `include Yast` which cause that all
modules living in Yast namespace start living in global namespace and start
colliding with ruby classes and modules. But also other smaller modules can
cause problem.

Sadly Ruby uses the term include for something fundamentally
different to most other languages, most prominently C (and YCP).
No wonder mistakes like that happen.

Also see:

"Oddly enough, Ruby's require is analogous to C's include, while
Ruby's include is almost nothing like C's include."

"This can be confusing as the include verb is used very
differently in other languages."


To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation
Follow Ups