-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
move along #3504
Comments
Related to #2966 |
I will add 2.1 label since for 2.1 there are planned works on new version of gdscript (or possibly another language with strong typing). |
python does this stuff with touples, while gdscript does not support touples. I guess this could be added as syntax sugar though |
problem is, python an do something like a,b=b,a to swap values, for example, should consider it too |
From @Dillybob92 in #4863:
|
Aww I guess Reduz does know :D So up to him, probably a lot other important stuff for 2.1 ++, but thanks @vnen, didn't see this thread :) |
holy shit @vnen s memory is next level |
It'll be great to have CSV |
In Pascal or in Nim language like so:
It might be a bit nicer to read. |
I'd love if we're able to do this
Something like that would be much more useful. |
I want to see a real usecase though, I just think it would make oneliners more prominent :( |
Well such sugar is not particularly useful. What is useful, however, is:
But that's not trivial to implement. And of course if the above syntax is supported, then multiple assignment to literals should be supported too, so the above could be:
|
@akien-mga that's precisely what I had in mind In fact |
Ok, let's say I agree that it is useful, even though the implementation would be tricky. 😃 |
Oh, the other thread was a duplicate. Anyway, I could look into how I could implement this with help of the pattern matcher. The lazy approach would just reuse the pattern syntax but that's not very pythonic... I guess I'll play around with it a little bit |
@vnev |
@ClikCode I was just citing @Dillybob92. And for the sample code, I believe the proposal meant that I don't have a personal opinion on this subject. |
@vnen To my trained pythonic eyes, that code looked like a syntax error. It's not a problem with you or anyone. I just want the code to be readable.
How about this? Reuse the ruby-like dictionary. |
@ClikCode |
@trollworkout that could be done with lists |
@ClikCode You can even omit the comma. You understand why this is a good idea right? a =1, b = 2, c = 3 a = 1, b = a, c = b a = 1, b = a, c = (null) a = null, b = (null), c = (null) create a quick variable swap in a function Reduces the amount of typing for example only one = equal symbol is necessary and adds the ability to quickly assign one variable value to another. |
of course this can be written in so many ways i just find this particular way most useful because no comma only 1 equal and only 1 var |
@trollworkout Let s try writing without any commas periods and other punctuation marks whatsoever ok I find this type of listing items variables topics or just things particularly disgusting myself Here is the above with the "other punctuation marks" back in: @trollworkout Let's try writing without any commas, periods, and other punctuation marks whatsoever, ok? I find this type of listing items, variables, topics or just things particularly disgusting myself. |
how about we don't even bother about it anymore |
if you guys not willing to discuss and just willing to disagree or find things i say "disgusting" let's agree to not even bother about it and not even implement it. sounds like a much better approach. why even debate. i suggest we revert to name calling next. |
Well Bojidar's word might have been a bit strong, but he was just saying he considers your proposal to chain variable declaration with no separator a bad idea, opinion that I share. There is still interest in having the possibility to declare multiple variable at the same time, but the syntax it should have has to be consensual. Unpacking à la Python with Now, thanks for killing this issue that we had taken as reference for other similar requests... I guess I'll just reopen the most relevant one. |
@akien-mga Please open another issue have your discussion without me because obviously i'm not needed, wanted or invited. That is my ideas are too "disgusting" for you. |
@trollworkout I'm sorry if you think that I think that your whole proposal is bad (double-read the last sentence, just in case). What I meant is that punctuation marks are there for a reason, and I find it hard to understand others without those. I'm not against Finally, if you find my previous comment too terrible to bear, I would gladly remove it and reapologise for it. |
troll is being immature. boji had acted immature as well. but troll,
you are trolling. if you over react like that you really need to go
see a therapist. we are all trying to get along and work on this
amazing project
…On 29/01/2017, Bojidar Marinov ***@***.***> wrote:
@trollworkout I'm sorry if you think that I think that your whole proposal
is bad (double-read the last sentence, just in case). What I meant is that
punctuation marks are there for a reason, and I find it hard to understand
others without those. I'm not against `a, b = 1, 2` and some of the other
ideas expressed above.
Finally, if you find my comment too terrible to bear, I would gladly remove
it and reapologise for it.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#3504 (comment)
|
Ok let's stop trying to make each other's diagnostic, case closed. |
nope
The text was updated successfully, but these errors were encountered: