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

Use of const String in receive parameter #51

Open
0kenx opened this issue Aug 7, 2023 · 8 comments · May be fixed by #401
Open

Use of const String in receive parameter #51

0kenx opened this issue Aug 7, 2023 · 8 comments · May be fixed by #401
Assignees
Milestone

Comments

@0kenx
Copy link
Contributor

0kenx commented Aug 7, 2023

The following code should work:

const ConstMsg: String = "ABC";

receive(ConstMsg) {}

Currently it report error Syntax error: expected ":"

@0kenx
Copy link
Contributor Author

0kenx commented Aug 7, 2023

Nevermind, I got it to work

@0kenx 0kenx closed this as completed Aug 7, 2023
@0kenx
Copy link
Contributor Author

0kenx commented Aug 8, 2023

Reopened as this is indeed impossible

@0kenx 0kenx reopened this Aug 8, 2023
@xsr
Copy link

xsr commented Aug 27, 2023

impossible because you should not do

@0kenx
Copy link
Contributor Author

0kenx commented Aug 28, 2023

What's the reason for that? It feels like completely natural semantics.

@xsr
Copy link

xsr commented Aug 28, 2023

reason I guess to do another N compiler passes, what's the problem to utilize any template processor and do such replaces if you want

moreover you are free to extend compiler and add this writer, why don't you try?

@xsr
Copy link

xsr commented Aug 28, 2023

look, the code you are writing running NOT WHILE COMPILING but on TVM, this is why you shouldn't even think 'cause it's broken design

@0kenx
Copy link
Contributor Author

0kenx commented Aug 28, 2023

Of course I can preprocess. But I also want the language itself to have good properties. The compiler should just replace const string with its content first.

@xsr
Copy link

xsr commented Aug 28, 2023

no it should not you are wrong but let's stop the flame. you will not believe me and I remember when was just like you to waste more time on this

@anton-trunov anton-trunov added this to the v1.3.0 milestone Feb 16, 2024
@Gusarich Gusarich self-assigned this Mar 26, 2024
@anton-trunov anton-trunov modified the milestones: v1.3.0, v1.4.0 Apr 19, 2024
@Gusarich Gusarich linked a pull request Jun 11, 2024 that will close this issue
4 tasks
@Gusarich Gusarich modified the milestones: v1.4.0, v1.5.0 Jun 20, 2024
@anton-trunov anton-trunov modified the milestones: v1.5.0, v1.6.0 Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants