BjarneStroustrup / profiles

site for discussing profiles design

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some level os customization of Profiles system can avoid a messy growth in their number.

Shadoware opened this issue · comments

I was just thinking about this situation and I dont know if the Profiles idea already include something like the following, if so, just disregard this text.

It seems like many people always want some different feature, so if its possible to override some particular Profile rule it could create a way to people customize the Profiles to their will.

For example:
Considering a Profile just like a rule set, each rule could have a number.
So I could use something like that:
[[memory-safe-delete{3}]]
That would import the memory-safe profile to current file or project but ignore the profile rule number 3, for some compatibility necessity for example.
Some other code tag could exist to ignore half the rule set of some profile, and also should be possible to use more than one profile simultaneous and create an alias as a new Profile just for somebody's needs.
For example:
[[realtime{1-10}]] // That would import just rules from rule number 1 to rule number 10 from realtime profile.

using [[big-software]] = [[memoy-safe]] && [[realtime{1-10}]]

Tha would create a profile alias, or custom profile named big-software and it would consists of all rule set from memoy-safe profile plus realtime profile less rules from 1 to 10 from the realtime profile.

That would be good to keep the number of official Profiles low and at the same time allow people to customize the Profiles for their needs.

I think it would be better to have a low number of official profiles, like 10 or 15 than to have 300 of them if lots of people starts to want specifics profiles.

Likewise, we need to account for baremetal use cases. Profiles can help detect 'dragons lie here' scenarios that are often caught or handled by operating systems.