Open george-grec opened 1 month ago
Just wondering why this isn't allowed? Is there a reason (since it seems fairly reasonable) or was it just left to be implemented later?
Thank you! Good suggestion.
@slightlybelowzen It's just something no one has implemented. The stuff that people decide to work on is the stuff that gets done.
Fair enough, I could try to hack something together this weekend, see if I get anywhere😀
Wonderful! Thank you
I started looking into that. Not sure if @slightlybelowzen has started something too but it doesn't matter too much to me if my code doesn't go anywhere, this is a pretty cool task to start getting familiar with the code.
I just had a question @lpil, do we want to support any binary operation in const
statements or just the string concatenation?
If foo <> "bar"
is allowed shouldn't any operation on consts be allowed too?
pub const foo = 5
pub const foo_bar = foo + 5
Just concatenation for now as it does not require compile time code execution to implement.
why doesn't concatenation require compile time code execution? we should inline the concatenation operation? If so then what's the difference with inlining other operations?
Because that's how Erlang works.
yeah I don't know I was more thinking about the javascript part. sorry about the questions, I was just trying to understand a bit more. I will try to make a PR anyway, we'll see
Thank you 💜
This is currently not valid syntax:
It would be great if this would work!