StoneCypher / fsl

Finite State Language specification
9 stars 1 forks source link

Variance rules for property defaults #1218

Open StoneCypher opened 2 years ago

StoneCypher commented 2 years ago

So what's the feature?

Discord Keen#4469 recommends an interesting idea - the ability to set (and implicitly therefore also to change or to remove) property defaults after the machine has been created.

I need to think this over some. It's not entirely clear that there's a correctness problem? This would be by design ostensibly.

A machine implementor would need the ability to refute this. Or, maybe to permit this explicitly? I guess the real issue is the default default behavior, ba-dum tiss. The discussion about default privacy informing members in c++ is of consideration here.

Alternately, the machine implementor could just set the default default, which would make porting easier, suggesting that in turn there is actually a default default default - boo; hiss. A tomato perhaps?

Yet, once less stupidly named, this seems likely the way forwards.

Default default is to default to default default default, which is to dis-permit changes in general unless explicitly permitted. However default default may be defaulted to permit, meaning there also needs to be an explicit dis-permit structure.

Wheeze.

In general, there's also the question of whether permission to change is permission to create or remove; indeed,

 

 

Is this related to a problem? If so, what?

Dunno; opening this by proxy from Discord.

 

 

Describe the solution you'd like

  1. machine attribute: mutable_prop_defaults=[true|false|undefined is false];
  2. changeability (all three mutually exclusive)
    1. explicit permission (when mutable false): property foo default bar editable;
    2. explicit permission to create and remove: property foo default bar removable;
    3. explicit dis-permission (when mutable true): property foo default bar constant;

 

 

Describe alternatives you've considered

None, really.

 

 

Additional context as you see fit

No