Skip to content

Concept: Here Documents #737

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

Merged
merged 11 commits into from
Apr 30, 2025
Merged

Concept: Here Documents #737

merged 11 commits into from
Apr 30, 2025

Conversation

glennj
Copy link
Contributor

@glennj glennj commented Apr 25, 2025

Next concept: here documents and here strings.

@glennj glennj added the x:module/concept Work on Concepts label Apr 25, 2025
@glennj glennj marked this pull request as draft April 25, 2025 15:26
@glennj glennj requested a review from a team April 25, 2025 15:26
@glennj glennj changed the title Concept heredocs Concept: Heredocs Apr 25, 2025
@glennj glennj changed the title Concept: Heredocs Concept: Here Documents Apr 25, 2025
@glennj glennj requested review from kotp and IsaacG April 26, 2025 14:51
Copy link
Member

@IsaacG IsaacG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doc is largely written in the passive voice. Was that an intentional choice?

@glennj
Copy link
Contributor Author

glennj commented Apr 26, 2025

This doc is largely written in the passive voice. Was that an intentional choice?

That's the way Google Gemini spat it out at me, and I didn't do a rewrite.

@glennj
Copy link
Contributor Author

glennj commented Apr 27, 2025

@kotp @IsaacG
Do you think it's worthwhile to add a "when not to use heredocs" section?

I'm thinking about an opinion like "scripts are for code, documents are data and should be shipped in a separate file. Besides, long blocks of text break the flow of the code."

@IsaacG
Copy link
Member

IsaacG commented Apr 27, 2025

@kotp @IsaacG Do you think it's worthwhile to add a "when not to use heredocs" section?

I'm thinking about an opinion like "scripts are for code, documents are data and should be shipped in a separate file. Besides, long blocks of text break the flow of the code."

I wouldn't be so prescription. Maybe list it as a potential drawback vs "don't use them".

"Here docs are great for X, Y, Z. However, they can sometimes break the flow of the code and make the code harder to read."

@kotp
Copy link
Member

kotp commented Apr 28, 2025

@kotp @IsaacG Do you think it's worthwhile to add a "when not to use heredocs" section?

I'm thinking about an opinion like "scripts are for code, documents are data and should be shipped in a separate file. Besides, long blocks of text break the flow of the code."

A typical uses list could be nice. An example of "poor formatting" and "good formatting" options can be useful.

Also replacing the image in the concept readme with a mermaid diagram.
@glennj glennj force-pushed the concept-heredocs branch from cc50d52 to 3b19e82 Compare April 28, 2025 20:17
@glennj
Copy link
Contributor Author

glennj commented Apr 29, 2025

@IsaacG if you can, please have a look at today's commits.

@glennj glennj marked this pull request as ready for review April 29, 2025 22:07
@glennj
Copy link
Contributor Author

glennj commented Apr 29, 2025

@kotp are you sufficiently satisfied? Are there changes you'd like?

@glennj glennj merged commit ad2cc24 into exercism:main Apr 30, 2025
2 checks passed
@glennj glennj deleted the concept-heredocs branch July 28, 2025 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:module/concept Work on Concepts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants