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

Turn strings into first class values #4

Open
jvdb opened this issue Jun 28, 2012 · 2 comments
Open

Turn strings into first class values #4

jvdb opened this issue Jun 28, 2012 · 2 comments

Comments

@jvdb
Copy link
Owner

jvdb commented Jun 28, 2012

So that the following becomes possible:

SomeStruct {
  somefield: "abc"|"def";
  otherfield: !"abc";
}
@JJWTimmer
Copy link
Contributor

modifiers (terminatedBx) should also work with strings (and multiple values, or the documentation on modifier + multi val should be created).
Also, when allowing strings in not and or, a check if strings are allowed at a certain expression should come in handy.

@jvdb
Copy link
Owner Author

jvdb commented Oct 8, 2012

I think strings should just return to being real value types at the lowest level, i.e. let the generated code handle strings instead of just bytes. This does present some challenges though (different size strings in expressions means the size is unknown at compile time. Furthermore, even strings that have the same amount of characters may actually be different size due to encoding, so encoding should be done at compile time).

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

No branches or pull requests

2 participants