Replies: 3 comments 2 replies
|
Maybe instead of |
|
Also how about |
|
I've been having some second thoughts about this plan. On the one hand I quite like the idea of having pseudo-namespaced builtins to keep things organized and discoverable. But on the other hand, it does create multiple ways to do do something. Which is a little less appealing. This is something that probably should have been implemented from day one but now I'm not too convinced it's a worthwhile change. Definitely open to some opinions on this matter. What I have done in the meantime is added support for documentation to have subcategories (basically just tagging). And the website can now group similar items. eg: https://dev.murex.rocks/commands/ I think this a good starter to solving the discoverability problem |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The builtins are pretty undiscoverable at the moment and that's an issue because of the number of builtins that are included with Murex.
I experimented a while back with aliases for common array-based operations with a
listprefix:So I'm thinking of expanding this out:
list: anything that reads and returns an array (even if that operation supports an array length of 1)list.new.str: would point toalist.new.type: would point totajaas a builtin and have it as an alias tota json. Becausejais already served by%[]and having a separate builtin just adds to the noise.structordata: anything that can read any kind of structure (object / map or array). The output need not be a structure. So something likecountwould be astruct.countstruct.newordata.new: functions used to generate structs (eg2darrayandmap)sys: functions likeos,cpuarch,cpucountescape: escaping functions likeescurlfs: filesystem operations (Changes to naming conventions: request for suggestions #860 (reply in thread))That will still leave a whole lot of stuff uncaptured, but it's a start.
why do this?
My thinking is purely around discoverability.
Stage one: create aliases to get a feel for if the naming convention works. I wont document those alises at first, I just want us to get a feel for what works and what doesn't.
Stage two: swap the aliases and builtin. So that the builtin names then become
list.regexand the alias isregexp. This should retain backwards compatibility while also allowing the website documentation to having things grouped in a more helpful way. egThe ultimate goal is to make it easier for new people to start using the shell.
suggestions required
So what I'm looking for is some advice and suggestions around sensible prefixes. Is the examples above sane or not? Can you think of other category names?
Is this idea even a good one? Am I over thinking things and creating a bigger problem?
All reactions