User:Anonymous31415927: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
(Blanked the page)
 
Line 1: Line 1:
Please re edit your Python comments about other solutions to be less antaganostic. [[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 15:31, 19 January 2020 (UTC)

----


Yes, it's the same I suggested to him/her [[User_talk:Anonymous31415927|here]] :-)
Anyway, this is a wiki for showing different solutions for different languages, not to teach how to code. Your comment is IMHO off-topic, unnecessary polemic, too much verbose and highly questionable<br />
[[User:Marco Sulla|Marco Sulla]] ([[User talk:Marco Sulla|talk]]) 17:05, 19 January 2020 (UTC)

----

<blockquote>But 2, 1 and 0 are special cases, thus they write conditional expressions to split the flow control. Of course this leads to unnecessary entanglement in the source code.</blockquote>

I don't see any entanglement, can you explain it (preferably here?). On the contrary, there's nothing more entangled that hard-code.

<blockquote>It seems to be due [...] repetitive elements.</blockquote>

Off topic.

<blockquote>Therefore it is better exclude these special cases outside the loop. This significantly reduces the number of conditional statements, which is generally a good idea. (Conditional statements hamper pipelining in modern CPUs.)</blockquote>

The fact you are really concerned by the performance of this little task make me a big smile :-) Have you ever eard about ''premature optimization''?

<blockquote>you should notice that this trivial solution is: 1. shorter; 2. simpler; 3. more readliable; 4. easy for i18n and l10n (including Hebrew, Japan, Korean); 5. open to extensions; 6. more pythonic (see Zen of Python); 7. better optimized and faster; 8. funny.</blockquote>

1-3. and less powerful and hard coded<br />
4. no, see the simplified functional version<br />
5. how?<br />
6. I don't think hard code is considered pythonic...<br />
7. see above<br />
8. Not at all. Functional solutions are much more funny, since you can create the variation of the song you want :-D

<blockquote>BTW, there is a reason [...] to autogenerate "99 bottles".</blockquote>

Again, off topic.

[[User:Marco Sulla|Marco Sulla]] ([[User talk:Marco Sulla|talk]]) 18:00, 19 January 2020 (UTC)

Latest revision as of 12:19, 22 July 2020