delphi
delphi copied to clipboard
Consider consistency for the exercises
- Is there a style guide for Delphi?
- Are these styles encouraged or enforced?
- Are there any conventions that we should adopt on this track for the sake of consistency?
- Can we enforce these?
- Is there a linter? Are there many? Should we use one?
- Is there a common convention for filenames? If not, what should our convention be?
Note that this is about the exercises (the test suites and code examples), not people's solutions.
Embarcadero has this style guide. This is a guide consisting of suggestions, they are not enforced by the Delphi IDE.
Is there a linter for it, based on that guide? (Is this closed prematurely? It does not seem like the points are really answered yet.)
I am not aware of any linter. The style guide is only a suggestion on how one should style their code. It is not enforced.
It is not enforced. Can it be set to be enforced? I don't think we should aside from the 'very strongly adopted' styles, if even that. It is something that can limit communication, at times. If so, it should be easy to communicate that the style was deviated from and disable the check for that(those) statement(s).
Should there be a link to that style guide in the documentation, for the development notes?
I know of no way to enforce a particular style. I know the IDE has the ability to format your code, I've never used it and it is voluntary.
A link to the guide is not a bad idea. Where in the documentation should it be mentioned?
Could be delivered in the first exercise, or in the documentation for the track. Perhaps mentioned in first exercise, but stored in the documentation for the track more fully.
I see no problem providing it in the first exercise (I presume this is hello-world). Where would it be stored in the documentation? How would it be provided in the first exercise? I know there is a readme file supplied with each exercise fetched, but I recall off the top of my head how to affect what goes in that file, and specifically on an exercise by exercise basis.
In the Ruby track, we use a GETTING_STARTED.md file in the exercise folder. This has instructions for the student to help get started.
I'll check it tomorrow. Thanks
See you then!
Here's the documentation about exercise READMEs: https://github.com/exercism/exercism.io/blob/master/docs/fixing-exercise-readmes.md
Yes, that one, thank you very much @kytrinyx ...
I'm kind of stuck here until the revamped hello-world changes fall out. I think this discussion no longer applies to hello-world, but I am not yet sure which exercise is taking over the roll the H-W once filled. Are we getting a new exercise, perhaps a greeter or should bob pick up the reigns?
I've suggested a replacement for the old hello-world here: https://github.com/exercism/problem-specifications/issues/548 I hope we can land on a spec for it in the next few days.
Putting the Object Pascal Style Guide here so I can find it easier later. This document is pretty old. Will have to test all the links and remove the ones that are broken.
@kytrinyx said:
Here's the documentation about exercise READMEs: https://github.com/exercism/exercism.io/blob/master/docs/fixing-exercise-readmes.md
@kytrinyx the above link is broken. I am trying to figure out where the file has gone to (assuming /docs repo) and what the file's name is. Thanks.
Ah, sorry! https://github.com/exercism/docs/blob/master/language-tracks/exercises/anatomy/readmes.md
No worries. Thanks @kytrinyx
In active development for formatting. Taking advantage of github support for org files.
Is there a style guide for Delphi?
http://edn.embarcadero.com/article/10280
Are these styles encouraged or enforced?
Encouraged by the style guide, yes. Enforced by the IDE, no.
Are there any conventions that we should adopt on this track for the sake of consistency?
A recent development that I have decided to adopt is to not use inline variable declarations or type inference in test suites. This capability has only become possible in the latest version of Delphi released at the end of 2018. Any code written using these new language features will not compile in older versions of Delphi. I am not enforcing this rule on solutions or examples.
Can we enforce these?
Manually, yes.
Is there a linter? Are there many? Should we use one?
I am not aware of any linter.
Is there a common convention for filenames? If not, what should our convention be?
No common naming convention other than files containing code have .pas extension. Files that contain UI information have .dfm extension.
This quickly covers the points raised in the first comment.
It sounds like the most useful next step here, then, would be to document in the README or contributing file the conventions that are in place, and then not worry about automation.
It sounds like the most useful next step here, then, would be to document in the README or contributing file the conventions that are in place,
I agree. I have ignored the README for this repo.