On 2/24/20 7:24 AM, Rhodri James wrote:
This seems a lot like trying to shoehorn something in so one can write idiomatic R in Python. That on the whole sounds like a bad idea; a friend of mine use to say he could write FORTRAN in any language but no one else could read it. Wouldn't it be more pythonic (or more accurately anything-other-than-R-ic) to use an interface that was more like
I have seen many times someone in a forum for language X say that they have used language Y and it has this nifty feature that they wish language X had, so lets modify language X so it is more like language Y. Quite often language X and Y are very different languages with different purposes. My feeling is that if you really want the features that language Y provides, you probably should be programming in language Y, not some very different language X. Perhaps it makes sense to ask for a better integration between language X and Y, so you can call a procedure written in one from the other (but we need to realize that sometimes this might not be possible as they have very different run time requirements).
I don't know if this comes from external requirements, someone tells the Y programmer to write a program in X, or they find that the language Y isn't well supported in some environment, but language X is.
Either way, making language X look more like Y is rarely the right answer. If the matter is more appearance (you can do it but it looks very different) then perhaps the right answer is to really learn language X and get used to writing in its style (or just keep writing in language Y, but USE language Y). If language X is really missing some capability of language Y, then if the capability really is within the wheelhouse of what language X should be able to do, then adding it to the language might make sense, but it doesn't need to look the same as language Y if that notation doesn't make sense in X. It should also be remembered that not all languages need to be good at all things, and each language has a set of things it does well, and you don't want to hurt that set to add something new. Also, all languages (well, maybe almost all) are Turing complete, so anything that you can do in one, it possible in the other, it just might not look pretty or be simple.
-- Richard Damon _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/7YNSC77OEBYIEKWFGWBXWAOSZOHT7G3W/ Code of Conduct: http://python.org/psf/codeofconduct/