Skip to content

Comments

Fixed the GetItemExpression#111

Open
stof wants to merge 1 commit intoschmittjoh:masterfrom
stof:get_item
Open

Fixed the GetItemExpression#111
stof wants to merge 1 commit intoschmittjoh:masterfrom
stof:get_item

Conversation

@stof
Copy link
Contributor

@stof stof commented Jan 31, 2013

It is currently totally unusable: adding it in the expression throws a fatal error because of the missing interface, and its compilation is totally broken.

@schmittjoh
Copy link
Owner

I'm not sure whether we should not completely remove this feature.

I've never used it myself, and it seems a bit too much for expressions; after all, you shouldn't start to program in there. Could you maybe share your use-case?

@stof
Copy link
Contributor Author

stof commented Jan 31, 2013

The only reason why I use it currently is because I'm doing a weird hack for now to be able to workaround the missing visitors rewriting the AST.

But it should either be fixed or removed. Keeping it totally broken does not make sense.

On the other hand, if your application uses arrays to store the values instead of using objects with getters and setters, it may make sense to allow accessing items. However, should the item key really be an expression in the parser ? Allowing only strings or integers may be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants