cl-str icon indicating copy to clipboard operation
cl-str copied to clipboard

Miscellaneous stylistic improvements

Open kilianmh opened this issue 3 years ago • 1 comments

  • replace concatenate with concat
  • replace nested if with single cond
  • replace unless null with when
  • replace if without else clause with when

kilianmh avatar Sep 15 '22 13:09 kilianmh

I was seeing an interest in calling the built-in concatenate, mainly to show the use of built-ins to new readers. Then it might be slightly more efficient, and more future-proof against a silly str:concat change. The other changes are good stylistic practice, this one less sure. What do you think?

vindarel avatar Sep 21 '22 15:09 vindarel

show the use of built-ins to new readers

Does the function definition of str:concat not already show the use of concatenate to new readers of cl-str? ;)

slightly more efficient, and more future-proof against a silly str:concat change

In that case the users should quickly find out about concatenate in the hyperspec. Alternatively we could mention concatenate in a comment / docstring.

kilianmh avatar Oct 03 '22 01:10 kilianmh

So then you want me to revert concat to concatenate for now so the other changes can be merged?

kilianmh avatar Jan 06 '23 14:01 kilianmh

So then you want me to revert concat to concatenate for now so the other changes can be merged?

yes please :)

vindarel avatar Jan 18 '23 09:01 vindarel

Now it should be as discussed ;)

kilianmh avatar Jan 18 '23 21:01 kilianmh

Thank you again!

vindarel avatar Jan 21 '23 09:01 vindarel