Talk:Abbreviations, automatic: Difference between revisions

m
 
(8 intermediate revisions by 2 users not shown)
Line 79:
 
: As mentioned above (concerning the website that I originally gathered all the information regarding the translation of the names of the days-of-the-week),   I think (but I have no basis in fact) that the translations were all (mostly?) done by   ''netizens''   and it appears the result aren't up to scratch.   This is my own opinion and observation.   All this research and information gathering (by me) was done decades ago, and Google was still in the future.   ... And all the ways the Far East languages are spelled and/or translated phonetically is so diverse, and I suspect that there are a lot of dialects that were maybe unconsciously used or referenced.   Perhaps I should add some sort of disclaimer about the veracity of the data.   -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:07, 23 September 2017 (UTC)
 
==Solution for Python==
'''Preface:''' I just registered recently on this website and decided to make my first contribution for a problem that didn't have a solution for Python. <br/>
When I finished writing the code, someone else already provided solutions. <br/>
Imperative: [http://www.rosettacode.org/mw/index.php?title=Abbreviations,_automatic&oldid=272170#Python http://www.rosettacode.org/mw/index.php?title=Abbreviations,_automatic&oldid=272170#Python] <br/>
and Functional: [http://www.rosettacode.org/mw/index.php?title=Abbreviations,_automatic&oldid=272190#Functional http://www.rosettacode.org/mw/index.php?title=Abbreviations,_automatic&oldid=272190#Functional]. <br/>
I found my solution more concise, Pythonic and readable than both versions and decided to replace one of them by my version. <br/>As my solution follows mainly functional paradigm, apart from main function, I decided to replace the functional version. <br/>
'''Problem:''' Please, provide feedback on if I should leave it like that, try to make my version completely functional (and probably less readable), or post it separately (if so then how should I name my version)? <br/>
Here is my code: [http://www.rosettacode.org/mw/index.php?title=Abbreviations,_automatic&oldid=272203#Functional link] <br/>
Any notes on the code itself are also welcome. --[[User:Georgy|Georgy]] ([[User talk:Georgy|talk]]) 12:57, 4 November 2018 (UTC)
 
The author of the original functional version posted both his and mine versions. So, I guess, problem solved! --[[User:Georgy|Georgy]] ([[User talk:Georgy|talk]]) 13:12, 4 November 2018 (UTC)
: Always good to see more functional Python here. Perhaps just add an explanatory gloss on what your variant is optimising for. (Mine, for example, aims to minimize the number of new lines of code that need to be written and tested, and to enable fast and flexible refactoring.) Most coders are not football-rattle tribalists – they are polyglot professionals with a varied hinterland, who carry a flexible toolkit of abstractions and languages. My variant will probably be more readable to those who happen to be familiar with the ML (or Bird & Wadler 1988) tradition of functional programming, which shares names for universal functions across a number of different languages, and has a particular interest in denotational semantics, and the underlying mathematical necessities of function composition. It's a tradition which has flowed into quite a few function names in Python, and also into its list and set comprehensions. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 14:44, 4 November 2018 (UTC)
 
:: PS the pious incantation of PEP 20 ''"There should be one-- and preferably only one --obvious way to do it"'' looks charming on paper, and goes '''very''' well with flutes and wind-chimes (as long as you can hold your meditation posture and keep a straight face) but it is, of course, just a pious hope – very much like looking out of the school-room window and wishing that there were only two numbers that could be multiplied to obtain 60, only two that could be added to obtain 100, and only one integer ratio that could roughly approximate Pi. An understandable aspiration, but mathematically and practically it makes no sense at all :-) [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 18:06, 4 November 2018 (UTC)
9,655

edits