Surnamespacing

Everyone has a library. Everyone has their own utility classes and functions they’re using in their own personal and contracted projects. And now that everyone has a blog too, they’re all releasing their libraries as open source, using the commando…


This content originally appeared on Zach Leatherman and was authored by Zach Leatherman

Everyone has a library. Everyone has their own utility classes and functions they’re using in their own personal and contracted projects. And now that everyone has a blog too, they’re all releasing their libraries as open source, using the commando underoo philosophy of wild, free, and unrestricted naming schemes for their code. Not anymore. Let’s surnamespace.

What does surnamespacing give me?

  • Accountability: Your code is directly linked to your family honor. You’d be surprised how hard people work at test cases and increased code coverage when the respect of their lineage is at stake.
  • Connect with your Extended Family: Connect with programmers sharing your namespace, your family is now your development team.
  • Minimize Collisons: The ball and chain associated with an imposed naming scheme means that we won’t have everyone using foo and bar to hold their code, unless you’re the lucky son of a bitch that has inherited that top notch surnamespace real estate.
  • Faster Initial Development Cycle: Sometimes naming your library is the hardest part. Skip this step and just surnamespace it.
    Jesus Christ, please show me some examples:

JavaScript Surnamespacing

var Christ = {
    Jesus: {
        walkOn: function(obj) {},
        turn: function(from, to) {},
        respawn: function() {}
    }
};
// Sample Usage
Christ.Jesus.walkOn('water');
Christ.Jesus.turn('water', 'wine');
Christ.Jesus.respawn();

Java Surnamespacing

package Christ;
public class Jesus {
    public void walkOn(String s) {}
    public void turn(String from, String to) {}
    public void respawn() {}
}

PHP 6 Surnamespacing (projected usage)

namespace Christ {
    class Jesus {
        public function walkOn($obj) {}
        public function turn($from, $to) {}
        public function respawn() {}
    }
}

Update: Apparently I can’t write Java code. Don’t tell work.


This content originally appeared on Zach Leatherman and was authored by Zach Leatherman


Print Share Comment Cite Upload Translate Updates
APA

Zach Leatherman | Sciencx (2008-05-07T05:00:00+00:00) Surnamespacing. Retrieved from https://www.scien.cx/2008/05/07/surnamespacing/

MLA
" » Surnamespacing." Zach Leatherman | Sciencx - Wednesday May 7, 2008, https://www.scien.cx/2008/05/07/surnamespacing/
HARVARD
Zach Leatherman | Sciencx Wednesday May 7, 2008 » Surnamespacing., viewed ,<https://www.scien.cx/2008/05/07/surnamespacing/>
VANCOUVER
Zach Leatherman | Sciencx - » Surnamespacing. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2008/05/07/surnamespacing/
CHICAGO
" » Surnamespacing." Zach Leatherman | Sciencx - Accessed . https://www.scien.cx/2008/05/07/surnamespacing/
IEEE
" » Surnamespacing." Zach Leatherman | Sciencx [Online]. Available: https://www.scien.cx/2008/05/07/surnamespacing/. [Accessed: ]
rf:citation
» Surnamespacing | Zach Leatherman | Sciencx | https://www.scien.cx/2008/05/07/surnamespacing/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.