Jump to content

Talk:Practical numbers: Difference between revisions

Would you prefer that I write my type comments in English ?
(Would you prefer that I write my type comments in English ?)
Line 6:
Hout, Your arguments contradict yourself. You in one place state its not typing - then in another argue that your version is ''better'' than Python typing. You state that its not Haskell typing, and yet you use the same syntax in typing Haskell code as well as Python. You are dishonest! --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 19:27, 31 March 2021 (UTC)
 
:: Silly comment Paddy3118, I can't even follow it – no idea what you mean. Don't you think the Python linters and interpreters might '''notice''' if the syntax used was from another language ? You are worried that Bool is different from bool, and Int from int ?
 
 
:: I find it '''very''' useful to think in terms of a more general type semantics, and a clean notation for comments.
:: As we've seen, the Python type hints for the compiler, which you have insisted on (deleting my clearer comments) make the type of the key Python function there much '''harder''' to read. In fact, they are actually misleading, and make no contribution to the code ... The Any type symbol leads us to believe that '''any''' type will do in those positions, where as in fact any divergence from what my comments clearly show would simply cause the code to fail ... Is that what you are really hoping for ?
 
 
:: Would you prefer that I write my type comments in English ? They might be a bit verbose – MH is much quicker to read at a glance ...
:: I find it works very well for informal notes to the reader ...
 
:: I do understand that you take a different approach, but why delete ? Does it really feel so threatening to have two different approaches side by side ?
:: After all, that '''is''' what Rosetta Code is for ... and PEP8 does caution us against forms of compliance which diminish clarity without adding value. Compliance can be left to the linters, and doesn't protect us from writing code which is unreliable, hard to refactor, or simply slow. Very bad code and very unreliable solutions can easily be written in superbly "compliant" code. Compliance is not enough – its only purpose (read PEP8 again) is to serve clarity, in a given context, and contexts vary. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 21:05, 31 March 2021 (UTC)
 
==Python: Comment on type hints for the functional example==
9,655

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.