Hacker Newsnew | past | comments | ask | show | jobs | submit | htyden's commentslogin

> a work is never truly completed [...] but abandoned;



I haven't done a lot of Ruby lately, and I don't know what the `NameSpace`-class is intended to be used for, but is the effect of the suggestion similar to that of https://github.com/hannestyden/require-here ?


It's intended to be used as a scope within which the default attachment point for constants is not the Object class but instead the `NameSpace` instance that the `require` call was made on.

Most people are talking about how this would allow you to require multiple versions of the same library (each in its own NameSpace), but I think that would be a bad use of it. I don't remember the last time I had a problem with conflicting libraries in Ruby, and I think the last time I did I just forked the offending library.

A more interesting use case is to have a framework like Rails use it to define namespaces for files without those files having to constantly refer to the name of the namespace they're in. That's something that's bugged me anyway.


You can somewhat achieve this by defining one top level module and then do the nesting of everything else with ::

    module SomeGrouping
      class Some::Nested
      end

      class Whatever
        def foo
          Some::Nested.new
        end
      end
    end
Sorry typing code on phone is a nightmare


EE is short for "enterprise edition", I assume.

I hope that is correct, and perhaps it is obvious to most people.



Thanks, that's much better than Medium.


If someone else touched the hardware, all bets are off.


It's context dependent. If you manage all hardware as a team, that statement is wrong. However, if this means your hardware integrity can't be guaranteed, you have bigger problems.


Obligatory Rich Hickey plug: https://m.youtube.com/watch?v=SxdOUGdseq4


That’s a great talk, but you have to wonder what that era Hickey would have made of overloading arity on list operations the way modern Clojure does.


I'm also a non-native English speaker, I also found the the title of the linked article weird and also saw the title of the Vsauce video recently. This all made me confused and I'm happy that you brought it up here and that people chime in to clear the situation up.


I assume that op03 is referring to Telegram, which I believe is founded by Russians. However, the company is head quartered in London and Dubai according to Wikipedia.


It is, by Russians living in exile.


https://intervene.dev/ has been very useful for me.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: