-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feature: CondExprAndOr (|| and && signs) #20
Comments
This comment has been minimized.
This comment has been minimized.
What do you mean, which existing ones? |
Oops, sorry! I read too fast. |
Considering the intent of Skript, I am partially against this kind of expressions. Sure, it's useful for power users but in the end, it kinda defeats the purpose of Skript being english-like. The conditions you've used as example can be a single condition in old Skript like this:
And it's pretty much the same case for the big majority of conditions. |
No it can't because they are two different variables (in his example).
|
it is possible, it is just a bit wonky:
But in the end, I am not against being able to use multiple conditions at once (as long as it isn't abused to the point it doesn't have any kind of english grammar resemblance), I am definitely against it using the mentioned symbols for it though |
Indeed Skript is english based, but as you probably saw, recently, Skript introduced this kind of shortcuts (e.g Default Value). I think we can add both syntaxes, and user make the choice of which one he prefers. It doesn't change all the code to implement that, and can make happy a lot of developers. |
At the time, I didn't really think about it but I would have definitely be against the ? pattern considering what I said above. This project doesn't have to go for the same path Skript went, I wouldn't say they were errors but at least from what I can see, it could definitely have been different, in a good way.
Exactly, developers. Skript isn't designed for your common developer, it is designed for people who don't have a lot of knowledge in the programming world in general, and that's ultimately what decisions should be based off. Just to make things clear, I am not against the feature itself, I am against the suggested pattern. |
After thinking about it, perhaps adding all of these programmer-friendly, beginner-unfriendly abbreviations isn't the best idea. I might roll back some of the syntaxes with these kinds of abbreviations to only keep the more english ones. However, there remains one issue with all this : |
Maybe should be good to have a plan of what skript-three should look like to avoid some confusion with an official Roadmap too. This plan and Roadmap could be an issue pinned, or a
Maybe move the discuss about it directly in #23 because it's no longer related to this issue. |
skript-parser is literally that, a parser for Skript. Skript, by definition, is a language that strongly embraces the concept of being English alike, becoming easily understandable even for those outside of the programming world. If it goes in a different path, it may as well be called something else. Furthermore, the language stops making sense when you start adding syntax like this, considering you could just go with python or another very high-level language.
I already addressed this point, so I'll just quote myself:
|
Implemented in the pull request #22. I close this issue. |
Please look at the pull request, and look at the discuss in this issue. |
Mb x) |
Type of Feature
Conditional Expression
Name
CondExprAndOr
Explanations
a conditional expression wich allow us to use || (or) and && (and) in a condition to make multiple conditions
Exemples
if {e} == 1 && {f} == 2
(if e is equal to 1 and f is equal to 2)if {e} == 1 || {f} == 2
(if e is equal to 1 or f is equal to 2)The text was updated successfully, but these errors were encountered: