I discovered, when I tried to use it in a real program, that my implementation of non-numeric keys was brittle; because it relied on a shadow second variable, accessed by naming convention, it would break when arrays were used in assignments, and also when strings were split into arrays.
I've bitten the bullet and switched to providing an external class which encapsulates the logic. This makes the programs a bit less free-standing, but a lot shorter and cleaner. It also would have saved me a bunch of bytecode generation, had I done this the first time round.
I discovered, when I tried to use it in a real program, that my implementation of non-numeric keys was brittle; because it relied on a shadow second variable, accessed by naming convention, it would break when arrays were used in assignments, and also when strings were split into arrays.
I've bitten the bullet and switched to providing an external class which encapsulates the logic. This makes the programs a bit less free-standing, but a lot shorter and cleaner. It also would have saved me a bunch of bytecode generation, had I done this the first time round.