Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do you refactor third party libraries delivered as binary?


How would you refactor a third party library delivered as a binary in a language with namespaces?


By importing names from that namespace and aliasing them. Or by creating another namespace and importing them there.

You can't seriously argue that "NSArray" as a single string is the same thing as (hypothetical) "NS.Array", where both "NS" and "Array" and the thing at "NS.Array" are semantically different things. Don't get me wrong, I love Smalltalk and Erlang - both languages suffering from the same problem - but I can recognize a shortcoming when it bites my arm off.


I was genuinely asking in my question above. I'm all for it as long as it makes sense. I've never messed with aliasing or anything like that - I'm decently fluent in Objective-C but have only really dabbled in ruby/js.

After looking around halfway through writing this, this looks pretty nice:

http://stackoverflow.com/questions/11091740/is-it-possible-t...

I see what you're saying. Maybe it's Stockholm Syndrome, but I do like knowing associated files in 3rd party libraries easily too. I don't know, I'll experiment with this more in ruby and see how it feels.




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

Search: