Catching up with patterns in @rgchris's modern codebases, he began to focus on being more frugal with symbols. You see many MAP! literals, and the embrace of the "less noisy" underscore to indicate empty fields:
I've spoken previously about my bone to pick with literal forms: Rebol's power comes from evaluation. No evaluator means no magic, and I don't want to be going in that direction.
But I've been inspired by the symbolic economy he has been achieving. Once you start to see that you were "spending money" on a colon for a SET-WORD, you start to think that spending it on an underscore could be a better investment.
Now that we've opened our minds a bit, why don't we open it a bit more?... ![]()
What if our object-creation dialect declares a null-initialized field by default for WORD!, and any fields you want to assign use GROUP! after it?
You could even use quasi-WORD! to say "I want to define this as a field, but make it trash by default, not null"
{
type ('document)
name
public
system
form
~head~
body (copy [])
~parent~
first
last
warnings
}
(No real reason to pick head and parent as being trash with the others not, I'm just pointing out the way such a feature might work.)
Or maybe a WORD! is implicitly a null field definition, and you can use SET-WORD to assign and it's assumed you know what you're doing:
{
type: 'document
name
public
system
form
head: ~
body: copy []
parent: ~
first
last
warnings
}
It leaves the choice to parenthesize up to you. If you think you need them, use them. If not, don't.
The syntaxes aren't actually in contention, the same dialect can offer all the choices:
type ('document)
-or-
type: 'document
-or-
type: ('document)
~parent~
-or-
parent: ~
-or-
parent (~)
That's fairly liberal, but this is the game we play... use something more rigid if it suits you.
Tune it to your tastes... per person, per project, per file, per function... that's the exciting thing about this, which we don't entirely get across when we debate the fundamentals for so long...
I think what I'm trying to get at here is:
The real power wasn't in the underscore. It was inside YOU (and dialects) all along...
![]()
And if @rgchris is super-pleased by this kind of dialect concept, it may be enough of a winner that it earns the default {...} behavior.
We might then have {{key1 val1 key2 val2}} make maps, and everyone can be happy.