Rules for new function in stdlib #277
Replies: 10 comments 14 replies
-
I think if can be a stdlib function this should not be implemented as a command. |
Beta Was this translation helpful? Give feedback.
-
I think that stdlib should be like a library exposed by the language itself to do stuff more quickly and be sure that you are doing it in the right way. To define what function we should have I looked at my script about the most common stuff I did and added them.Z |
Beta Was this translation helpful? Give feedback.
-
Proposition of the rulesThis applies only to built-ins. New mechanisms like subprocess management and so on should be added at the language level and not as standard library functions. |
Beta Was this translation helpful? Give feedback.
-
Maybe you can add "is infallible ?" condition to introduce as a built-in command |
Beta Was this translation helpful? Give feedback.
-
Updated propositionNew command that is commonly used can be added as built-in if ALL of the following requirements are satisfied:
|
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
To clarify the discussion, I would be interested to know for you what is the interest of an amber built-in command. |
Beta Was this translation helpful? Give feedback.
-
CymDeveloppement wrote:
In general I agree, but I believe some things do need to be builtins, for reasons of efficiency. For example, the An even more extreme example is my proposed However, with a builtin, we can be much more efficient, by implementing a native Bash |
Beta Was this translation helpful? Give feedback.
-
Ph0enixKM wrote:
My [yes] This command is used pretty often I would also like to point out that the |
Beta Was this translation helpful? Give feedback.
-
I would like to propose a clarification between builtin commands and builtin expressions:
As an aside, one solution would be to change the syntax, and require parentheses on everything, e.g. |
Beta Was this translation helpful? Give feedback.
-
I think it would be important to define rules to know if a new function should be integrated as a new command or not
for example a
printf
function, which is best, an internal command or stdlib function.Beta Was this translation helpful? Give feedback.
All reactions