Talk:McNuggets problem: Difference between revisions

m
Thundergnat moved page Talk:McNuggets Problem to Talk:McNuggets problem: Follow normal task title capitalization policy
m (Thundergnat moved page Talk:McNuggets Problem to Talk:McNuggets problem: Follow normal task title capitalization policy)
 
(5 intermediate revisions by 4 users not shown)
Line 19:
I would not have restricted the high limit to   '''100''',   but left that open-ended   (in other words, infinity).
 
It would also get around the use of a trade-marked (TM or ™) term(s) and also a registered (R or ®) trade-mark term, but it seems that Wikipedia skipped around those problems.   &bspnbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 21:35, 25 October 2018 (UTC)
 
 
==Python: "composing generic abstractions"==
Line 30 ⟶ 29:
::By default, names for these abstractions tend to be taken, in many languages, including Python, from the Haskell/ML tradition, which simply happens to be the main idiom of the academic research in functional programming. The name of Python's '''dropwhile''' function is an example, as explained at the top of the Python itertools module documentation.
::You can safely leave it alone. No need for deletionary zeal. Like it or not, functional programming is just one of the ways in which Python interpreters and compilers are used. Live and let live. I have absolutely no objection whatsoever to other styles of programming. What is good depends entirely on what we are optimising for, and in what context, and what is meant by 'idiomatic' is best left to linter tools. This code is fully linted by AutoPep8 and Auto-flake8. That seems enough to me. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 08:15, 27 October 2018 (UTC)
:: Perhaps the helpful part of your question is about what that variant adds technically. The shortest answer might be (1.) The use of currying in Python (2.) The application of the itertools.dropwhile function (3.) the relationship between set comprehension and the (concat . map) composition of two atomic and universal functions. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 08:42, 27 October 2018 (UTC)
: paddy Well, I suppose one 'use' is that it does have a style. The examples now under REPL import functional idioms from itertools and abuse them in some sort of style chimera. Somewhere in this discussion you complained about the use of functional idioms rather than the pythonic Comprehensions. These were introduced in Python2 and the What's New in Python2 documentation explains in length how to map one to the other. Why then when I write a solution importing nothing and using only Comprehensions do you denigrate it as 'From F#'. Surley this is the Pythonic Solution--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:08, 29 October 2018 (UTC)
 
:: Hi Nigel; according to the page history [http://rosettacode.org/mw/index.php?title=McNuggets_Problem&type=revision&diff=271712&oldid=271667 You have "denigrated" your own example]! Please check. [[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 14:48, 29 October 2018 (UTC)
10,327

edits