Skip to content

Conversation

scottchiefbaker
Copy link
Contributor

split() is a very basic function, and the documentation should be simple for novices to be able to understand. The split() documentation contains a lot of join() in the examples which only serve to muddle the concepts. This replaces the join() in the example with actual output behind a comment block

@Grinnz
Copy link
Contributor

Grinnz commented Apr 1, 2021

This looks much clearer and more consistent to me. One thing I would suggest is maybe leaving out all of the semicolons, since these are just showing the "output" of expressions and not what they'll do as a complete statement (which is nothing, in void context).

split() is a very basic function, and the documentation should be
simple for novinces. The split() documentation contains a lot of join()
in the examples which only serve to muddle the concepts. This replaces
the join() in the example with output in comments
Using split in this fashion is very similar to how
L<C<qwE<sol>E<sol>>|/qwE<sol>STRINGE<sol>> works.

However, this special treatment can be avoided by specifying
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't sound right. Two adjacent sentences each beginning with

However, this special treatment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch I'll tweak the wording.

@khwilliamson khwilliamson merged commit 0ae28ae into Perl:blead Apr 5, 2021
Corion pushed a commit to Corion/perl5 that referenced this pull request Jun 20, 2021
…xamples (Perl#18676)

* Remove join() from split() examples as it confuses the concepts

split() is a very basic function, and the documentation should be
simple for novinces. The split() documentation contains a lot of join()
in the examples which only serve to muddle the concepts. This replaces
the join() in the example with output in comments

* Fix a double sentence per KHW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants