This is a really interesting idea. Makes sense makes things more organized.
Ever wanted at your bank to separate your funds for proper management? Alas, out of three-four various formulae that each work differently (stock account, credit card account...), this is not possible. When I feel conspiracy-ish, I think this is on purpose, to prevent you to properly manage your funds. Anyway, I'm rambling.
Also available http://monero.wikia.com/wiki/Subaccounts
Something I would really like to see in the GUI wallet is "subaccount. Use: separating money for various uses, without having to resort to various addresses, which requires transaction fees, keeping several seeds... (this doesn't invalidate extra accounts for separation of concerns or mild protection against rubber-hose cryptography).
For instance, a "main subaccount", a "paying taxes" subaccount, a "car loan" subaccount... Those subaccounts would only exist within the wallet. You could get a better financial hygiene by applying rules like
Send 20% of salary to "savings" subaccount
IF incoming_payment_idD = my_salary_payment_id THEN send 20%_deposit to subaccount_savings.sub
default is main subaccount other subaccount may be chosen manually or with rules (see above)
- option 1: if no subaccount is specified, a ranking system scan the accounts and withdraw from the lowest ranking account. The wallet uses all the money from this account and move to the the next one, until it has enough. Ranking may be changed manually (for instance, main subaccount has ranking 0, "monthly errands", "monthly expenses" ranking 2, "car loan" ranking 3 and "emergency" ranking 100)
- option 2: if no subaccount is specified, alert + no sending. Option is simpler, doesn't hide stuff but relies more on user's discipline. All in all, this is my preferred option
All of this could be implement in CLI, of course. When I say GUI wallet, I really mean "final wallet" (as opposed to present simplewallet).
This could also be implemented in the unofficial wallets. It would be a nice way for them to differenciate from the official wallets (which could, eventually, integrate the idea later on). And it could happen before the official GUI and foster innovation.
A bounty could even be considered
I posted this on monero.wikia.com, as requested by Jojatetok http://monero.wikia.com/wiki/Subaccounts
this could even be more generalized: essentially it is an alias system for payment-id's and a grouped display. combined with openalias this could even work through different wallets (if there would a way to get all aliases for an address).
i like your idea to allow scripting. is your example only for explaining your point or do you want the user to have an integrated programming language and api? i am not sure if its a good idea to let "joe average" code his money himself
Indeed. Say, I work at IBM. I could create an openalias ibm.salary.david.latapie.name (using the
tx_payment_id query to add a specific payment ID). Later, I work for Deloitte & Touche, I just have to create a deloitte.salary.david.latapie.name OA.
Triggers could forward money to another wallet, but this is out of my scope. Also, payment ID will eventually be replaced by something better.
The pseudo-code is for explaining my point. Bank accounts routinely offer, as default and for free, the option to send a part of your money at a certain time to a certain account. Thus, it is considered simple enough to be handled by any bank account holder and safe enough to be accessible to end user. It doesn't have to be more complex than this.
Essentially, replicate the option in bank account, but with an unlimited amount of account (which have to be created first or can be open automatically upon the first transaction).
The same way Armory or Electrum have options Bitcoin Core doesn't have, this would be an incentive for justifying several wallets.
regarding simple programming languages for end-users i have made good experiences with graphical ones (eg https://code.google.com/p/blockly/ - dont know this one in detail; ours was handmade).
jojatetok is considering adding it once he is done with cross-platform.