There's only one way to allow anons and users to see different content -- create two pages in MediaWiki namespace (e.g. sitenotice and anonnotice, noarticletext and noarticletextanon). This method prevents from inventing //personae//-oriented content and limits the ways of creating/developing it (1. //a so-called Message// has to be defined at a 2. //quite high level that isn't likely to be watched// by ordinary users who develop such content).
I think many pieces of content, not only messages, but also templates, and even some elements of pages, e.g. help pages, could be improved with wikicode if there was a function {{#ifloggedin:1|2}}. Strong alert: this function must not be available in main!
Examples of use:
* related to T112724 -- let's allow anons to see a more newbie-oriented version of "my talkpage" message like: 'It's a place where anybody can write a message to an anon user {{BASEPAGENAME}}. Registered users are provided with additional useful tools like [[https://en.wikipedia.org/wiki/Wikipedia:Notifications|Notifications]], [...]'. Oh, wait, while creating this, I found out there's noarticletextanon. Who and when created this and why I know nothing about the thing?
* help, welcome etc. pages -- users don't have to be encouraged to create an account. Anons don't have to be bothered with some kind of tips or instructions, and can be informed at the top of some pages: 'these tips are helpful only for registered users. If you want to make use of it, create an account first'. Users don't have to see this in the reading mode.