-
Notifications
You must be signed in to change notification settings - Fork 19
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
Syntactic ambiguity may need to be resolved #1
Comments
Well this is an extreme example of a 'function', containing 'if' and 'is'. Usually parameters are all 'nouns' in a function declaration: |
To clarify: a variable/object matches a parameter, if it is of matching type:
|
To finally address your question: Skype is a singleton, so it's not really a parameter, only there for matching. Distinction between singletons / parameters : Upper case? Context? Quotes? I'd say context. Actually they don't need extra treatment: So
|
In this sample code, I noticed that function parameters were not clearly distinguished from other parts of functions, causing some confusion:
This code would be easier to read if the parameters were explicitly specified, like this:
This describes the program's intention much more clearly, ensuring that no parameters are created accidentally.
The text was updated successfully, but these errors were encountered: