Phoenix Himself
Phoenix Himself
To sum things up. I understand that this feature should be implemented for statements as well as for blocks
@b1ek It's not a problem to make our compiler "smarter". We just have to store additional information in ctx of how long arrays are declared or if we ever know...
@ArjixWasTaken before we code review this PR, please check if the problems that @b1ek mentioned can be resolved somehow (and how). I like this idea for a feature and would...
> ```js > const [a, b] = split("1,2", ","); > ``` @ArjixWasTaken could we simply translate this code to something like this in Bash (Here is a pseudocode): ```js var...
> unless there is a special bash mode that throws an error instead? Not too sure. I assumed that it would. I'd have to test it first on my computer...
@ArjixWasTaken if we want to support dynamic sized arrays, then we can check if the array length matches destructed array and fails if not. Like: ```php const [a, b] =...
Now assuming that we want to implement this syntax version: ```php const [a, b] = get_random_array() failed { echo "Variables couldn't be destructed from this array since it's length is...
It was introduced to strip all the comments
We can remove it entirely (I don't use it) or make it so that it makes the generated output obfuscated. Although I think I'm against obfuscating Bash. It should be...
I see that we're a bit divided on this. Let's leave it util we see what the community prefers.