Skip to content
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

Improvement of chapter "Výrazové prostředky" #1063

Closed
wants to merge 1 commit into from

Conversation

mildabre
Copy link
Contributor

@mildabre mildabre commented Nov 3, 2024

The term 'výrazové prostředky' is correct, but a regular developer understands the word "syntaxe/syntaktický prostředek" better, the title could be alternatively shorter "Syntaktické prostředky".

I suggest:

  • rearranging the order of items and putting service calls in second place - so that it is possible to give an example with a call to a non-static service method as a demonstration of services.

  • separating the creation of objects from the use of methods and functions for clarity.

  • adding these missing items:

    • calling a non-static service method
    • using a public service property

The term 'výrazové prostředky' is correct, but a regular developer understands the word "syntaxe/syntaktický prostředek" better, the title could be alternatively shorter "Syntaktické prostředky".

I suggest rearranging the order of items and putting service calls in second place - so that it is possible to give an example with a call to a non-static service method as a demonstration of services.

I suggest separating the creation of objects from the use of methods and functions for clarity.

I suggest adding these missing means:
- calling a non-static service method
- using a public service property
@mildabre
Copy link
Contributor Author

mildabre commented Nov 3, 2024

Notice: The syntaxe of public property of service is cofusing:

@myservice::$publicProperty()

You MUST use brackets, but brackets is syntax´element generally used in functions/methods, so I will send another PR with the proposal to at least add alias syntax WITHOUT brackets:

@myservice::$publicProperty

@mildabre
Copy link
Contributor Author

mildabre commented Nov 4, 2024

After deep discussion on nette forum here: https://forum.nette.org/cs/36714-rfc-upravit-matouci-syntaxi-public-property-sluzby-v-services-neon and continue on deep testing I found out that the syntax for public properties is implemented correctly:

@myservice::publicProperty

But this syntax is missing in documentation. Based on newly discovered facts I close this PR for changes in documentation and create a new one with updated correct proposal.

@mildabre mildabre closed this Nov 4, 2024
@dg
Copy link
Member

dg commented Nov 4, 2024

Prosímtě, do PR můžeš dál forcepushovat změny. Nevytvářej prosím nové kvůli každé úpravě.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants