Replies: 2 comments 2 replies
-
I would like that in comments so it is more easy to extract them and just keep the code as code |
Beta Was this translation helpful? Give feedback.
-
I'm not sure how the given example should work, could you explain it like I'm 5 yo? XD As for the idea I see one big issue. In bash if you're not using basic codeish functionalities, then you're using third party apps. Those apps can exist on a machine or not. Different versions of given app, can have different API (command names, args names, order of them etc.). While you're using By that I mean some good syntax for creating different versions of functions, for different versions of application. Amber would need to have the knowledge how to get and extract app version to execute correct code. In different versions some functions could exist and in others there would not. We need to account for that and tell it somehow to a user. We could give this responsibility to programmers and say to them "create different versions of your lib, for different versions of the app", but I think this approach is limiting. One Amber script can run on many different machines and making people choose correct version of the script for correct machine is worse than having one script that we incrementally improve for all machines. This is the part where Amber could really shine and be a good alternative for bash. With current syntax this is pretty easy. We could do something like this:
It works but it's cumbersome. If we will create this command builder we would need to think this through thoroughly, so that it's intuitive and safe. |
Beta Was this translation helpful? Give feedback.
-
There are some quirks that make the command syntax hard to use. For instance one must remember to properly escape strings like$cmd "{text}"$ and also think about other stuff... Maybe we should introduce some command builder syntax? Something like:
or even we can remove the
--
for standard field arguments:What are your thoughts on this?
Beta Was this translation helpful? Give feedback.
All reactions