I think @cannibalox covered most of the reasons. One last reason, I’d add is that it makes search faster.
I like to track Goals and progress. I create a page for each goal with a namespace Goal. The goal pages are empty, but I refer to them from the daily page. Even if I don’t exactly remember the name of the page, typing Goal/ restricts the search and makes it much easier to find the right page
Totally agree. I already use namespaces for organizing my notes when searching and differentiating notes of the same name, but proper support for them would be great.
Namespaces are helpful when searching for pages of a particular type. For example, if I need to create a link to a project, I can easily see all projects when searching for it. Same for Books, People, etc. Tags do not help when performing a page search when adding a link.
There are two ways to do namespaces, adding type:: book to every page that describes a book or adding it to the page title, like described here. The latter can be searched for, using:
Huge +1 — while there isn’t a difference in function here, it cuts wayyyyyy down on visual noise, especially for folks like me who use a lot of namespaces.
I like Roam’s 3 options for simplifying the view (full, abbreviated, do not display namespaces). I use the “do not display” option most commonly. The UI color change helps to differentiate between normal pages.
And also you can add the alias:: property to the namespace page to define a new way you can link to it. If you add alias::A guide to the good life to a page titled Book/Stoicism/A guide to the good life, you can link to it using [[A guide to the good life]]
Decent workaround, actually! I’ll try to use this for some of the high-traffic ones. Would still like this as a preference, but aliases might be ok for now.
The problem with alias is that you have to create one for every page you whant to shorten and when you rename the name of the page, you have to change all the “sub pages” aliases one by one.
I’ve released a custom.js snippet to collapse namespaces here (the prefixes are collapsed as ../ with a hardcoded color, to see the full page-name, either enterr Edit Mode or use the Hover Preview Tooltip) :
demo:
it’s bundled with another snippet to adjust the width of query tables, but it’s easy to extract/copy the namespace section only (just be careful to copy the mutation observer section at the top of tfile too).
I’m risking being pedantic and splitting hairs here, but I think there might be something useful to distinguish between here: I think namespaces serve best as contexts that are narrow enough to unambiguously resolve a name to a particular concept. That’s slightly different from a “type”. Sometimes the namespace will match the type, but sometimes it won’t. Here are two contrasting examples:
Namespace and type happen to line up:
Book/Matilda could be a name which refers to the book “Matilda”, while Movie/Matilda could be a name which refers to the movie of the same name.
In the context of the concept Book, Matilda refers to one thing, while in the context of the concept Movie, Matilda refers to another.
As it happens, Book/Matilda is a book, while Movie/Matilda is a movie.
Namespace and type don’t line up, and that’s okay, too:
Acme/Org Structure could be a name which refers to the organizational structure in the Acme Company, while Globex/Org Structure could be a name which refers to the organizational structure in the Globex Corporation.
In the context of the concept Acme, Org Structure refers to one thing, while in the context of the concept Globex, Org Structure refers to another.
But in both cases, the “type” of the entity the name refers to is an organizational structure. Acme/Org Structure is not "an Acme", and Globex/Org Structure is not "a Globex".
All of which is to say: I think both namespaces and type::s are useful, for separate (if often overlapping) things. I haven’t seen much (or maybe anything?) use type:: yet, but a simple use might be a plugin which puts an icon in front of each link based on the link’s type. You’d expect to see something like:
[[Book/Matilda]]
[[Movie/Matilda]]
[[Acme/Org Structure]]
[[Globex/Org Structure]]
(And having written all of that out, I now really want to write that plugin.)
Following up: Awesome Links does this! It uses the property page-type:: by default, though I’ve changed that to type:: for myself because I like it a little better. Then links to those pages inherit the icon:: of those pages’ types.