Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Learning from old mistakes #16

Open
Byteron opened this issue Oct 15, 2018 · 8 comments
Open

Learning from old mistakes #16

Byteron opened this issue Oct 15, 2018 · 8 comments
Labels
discussion Things to be discussed

Comments

@Byteron
Copy link
Contributor

Byteron commented Oct 15, 2018

We discussed the things that we want to have in our prototype. What might also be interesting to know, especially for the new volunteers, is what mistakes we don't want to repeat, which have been made in the Wesnoth 1.x. series.
So please, go ahead and tell us what the mistakes there were and how we could improve on that!

@Byteron Byteron added the discussion Things to be discussed label Oct 15, 2018
@GregoryLundberg
Copy link

Stop exposing yourself in public.

Wesnoth 1 has far too many subsystems which would be good except that what should be private implementation details are public interfaces.

@Byteron
Copy link
Contributor Author

Byteron commented Oct 22, 2018

I'm not quite sure what you mean. Could you give an example?

@LawnCable
Copy link
Contributor

I guess he means that you should only make vars/methods public that should be used by others, and keep the internal ones private so they don't get used/accessed outside of the module/sub-system.

@Byteron
Copy link
Contributor Author

Byteron commented Apr 12, 2019

Well that's somewhat probematic given that gdscript does not support encapsulation.

@LawnCable
Copy link
Contributor

Using an underscore to mark private methods like _methode should be enough (though I don't know if this changes any behaviour in gdscript because its python similarities)

@Byteron
Copy link
Contributor Author

Byteron commented Apr 12, 2019

yeah I'm generally using underscores to mark functions that are not supposed to be called, but gdscript does not prevent you from calling them anyways.

@spartanatreyu
Copy link

Perhaps a loose coding standards document should be drawn up then solidified once the majority of the project has been prototyped

@Byteron
Copy link
Contributor Author

Byteron commented Apr 23, 2019

@spartanatreyu while not enforced everywhere (yet), we do follow this style guide: https://docs.godotengine.org/en/3.1/getting_started/scripting/gdscript/gdscript_styleguide.html
(also linked in the CONTRIBUTING.md)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion Things to be discussed
Projects
None yet
Development

No branches or pull requests

4 participants