-
Notifications
You must be signed in to change notification settings - Fork 18
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
Implementation of a pre-processor #6
Comments
Which cases you think pre-processing can be really necessary & useful with brainfuck? |
@ryukinix using macros to have the possibility to "extend" the language/ make repetitive tasks easier |
Macros are really nice, but how you wish implement this? C-like syntax with |
Yeah, C-style(ish) macro... | +++++ | Each pipe would have a number related to it... Inside the code we would call the macros like: + make number 1 because is the first macro
^ call macro In this case we would need two more operators |
@ryukinix I was thinking of changing a bit the code above... What if it was like that? | number_five +++++ |
| arithmetic.brain | In the first case, I'm creating a macro called |
Discussing about this feature with @luizperes in a call was revealing, while this is a nice idea it brings a bit of complexity to Brain (As it was not complex enough [literal joke here]), adding operators expands the range of errors that we could possibly get. That's one of the drawbacks, we just have to study carefully when and how to implement this great feature! |
@ryukinix @rafaelcn Thinking and re-thinking, I realized that what @rafaelcn made so much sense. We should not add more complexity (more than planned) on Brain. As we want to use this language to solve AI problems as well, I do not think that we should add this new |
Anyone is welcome to re-open this discussion. |
I would like to get some pros and cons related to the use of a pre-processor on Brain. Any suggestions?
The text was updated successfully, but these errors were encountered: