Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support more variable names #16

Closed
wants to merge 1 commit into from

Conversation

albehrens
Copy link

This PR allows us to use variable names that start with $ or _

@cshaa
Copy link
Owner

cshaa commented Aug 9, 2019

Cool, I will look into it right after the weekend!
(Sorry for the delay, I really don't have time any earlier 😞)

@cshaa cshaa changed the base branch from master to v2.0.0 August 26, 2019 19:03
@cshaa
Copy link
Owner

cshaa commented Aug 26, 2019

I've looked into the code and I don't think it's ready for merging. The tests are broken (at least on my machine and in Travis) and symbols starting with numeric characters are just a no-go. I'm adding $ and _ myself in the v2.0.0 branch and if you want anything else added, please do open an issue. I'm sorry for the inconvenience.

@cshaa cshaa closed this Aug 26, 2019
@cshaa
Copy link
Owner

cshaa commented Aug 26, 2019

The reasons for not wanting to support symbols starting with numeric characters should be obvious but I'll iterate through some of them quickly:

  • Filtrex is meant to be used primarily by laymen (while also having advanced features for advanced users). Therefore it should be as intuitive as it can, and I don't see anything more intuitive than "letters mean variable, numerics mean number". The code 10 shouldn't have a vastly different meaning than 10a.
  • Number suffixes might be useful in the future, for example as a way to write bin/oct/hex, or to convey the meaning of physical units or something.
  • No programming language does this. In various programming languages, number suffixes are reserved for various modifiers (such as base or type), but the result is always a number. This would make filtrex's implementation confusing and controversial.

@albehrens
Copy link
Author

Thank you for your response. We have a use case, where we have to support "10.a" a variable name. Right now '10.a' == "something" will work with filtrex. Therefore I thought we could support the same expression just without the single quotes around 10.a. But obviously if you do not want to merge that change it is fine by me. Thank you for includinge $ and _ though 👍

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