Talk:Python (programming language)/Archive 8: Difference between revisions

Content deleted Content added
MiszaBot I (talk | contribs)
m Robot: Archiving 2 threads from Talk:Python (programming language).
m Archiving 1 discussion(s) from Talk:Python (programming language)) (bot
Line 241:
 
Importing a good piece of advice from [http://en.wikipedia.org/wiki/Talk:Perl#No_example_code.3F the Perl programming language talk page], the page could use some short pieces of example code. I would have written this myself, but I'm not sure if my Python style is very Pythonic or not. [[User:Shlomif|Shlomif]] ([[User talk:Shlomif|talk]]) 18:07, 26 November 2012 (UTC)
 
== “Python syntax clear” (neutrality issue) ==
 
I added (note that I did not remove the original assertion and reference) this alternative contradictory reference to the assertion Python's syntax is clear:
:<nowiki>or ugly<ref>[http://c2.com/cgi/wiki?PythonProblems Python Problems]: “<cite>Underscores for privates members are ugly</cite>” (among other comments)</ref></nowiki>
Someone (anonymously) later removed it, arguing the reference, which is c2.com, the Portland Patterns Repository, is not a valid source. Unfortunately, Wikipedia often cite the Portland Patterns Repository as a reference. So: either leave it or remove all reference to Portland Patterns Repository? Other options: either remove the assertion “Python syntax is said to be clear” or leave the contradictory option? (to keep the document neutral). It's likely if your only source is at Python advocates places, and you consider just these and only these sources are valid references, you obviously won't get anything else. I believe there is a neutrality issue here. By the way, there could be a “criticism” section in that page, as there is enough materials and references to feed such a section. --[[User:Hibou57|Hibou57]] ([[User talk:Hibou57|talk]]) 13:27, 14 September 2012 (UTC)
:The reference given to assert Python syntax is clear, is actually just this:
::“Mark Summerfield. Rapid GUI Programming with Python and Qt. "If you are new to Python: Welcome! You are about to discover a language that is clear to read and write, and that is concise without being cryptic."”
:Not even a reference: in a book? a talk-show? a blog? The person who remove my reference, asserted it's source is not valid. But that citation without even a source is valid to that person? There is an issue here.
:Then, second “reference” follow, related to the assertion Python is expressive, which is just a quote, without any reference:
::“Mark Summerfield. Rapid GUI Programming with Python and Qt. "Python is a very expressive language, which means that we can usually write far fewer lines of Python code than would be required for an equivalent application written in, say, C++ or Java."”
:Same story: quoted from who/what? Where is the reference? I don't believe Mark Summerfield's personal words (without giving any source for it above all), which is not a programming language specialist, but a Qt developer, do value more than an as much personal opinion (with a reference at least) expressed at the Portland Repository, which at least comes with more materials around. --[[User:Hibou57|Hibou57]] ([[User talk:Hibou57|talk]]) 13:44, 14 September 2012 (UTC)
 
:: [[WP:OSE]]. C2 clearly isn't [[WP:RS]], and this isn't changed even if other WP articles cite it. OTOH, not all references are required to meet WP:RS anyway.
:: IMHO, the private identifier syntax ''is'' ugly, at least when it requires direct access to name-mangled methods. [[User:Andy Dingley|Andy Dingley]] ([[User talk:Andy Dingley|talk]]) 13:50, 14 September 2012 (UTC)
 
:::I've removed the ref, as the reference only talks about underscores on privates being ugly, not the whole syntax. I can't find any ref saying the whole of Python's syntax is ugly - if anything the exact opposite. It's not fair to give the 'ugly' statement the same prominence as clear in the very first sentence.
:::I've added back in a ref from Python's own description at [http://wiki.python.org/moin/] which is where we ended up up with 'said to be' rather than 'is'.
:::[[User:Peterl|peterl]] ([[User talk:Peterl|talk]])
 
::::“said to be” is obviously not as strong as “is”, but that does not solve the issue (which is somewhat minor in some aspect, but still suspicious). What about just keeping the reference to the Python wiki and removing the two quotes from Mark Summerfield? --[[User:Hibou57|Hibou57]] ([[User talk:Hibou57|talk]]) 17:08, 11 October 2012 (UTC)
 
:::::I don't know why those references should be removed - they are relevant, ref'd and notable (although I don't have the book to check). Amazon lists 8 books by MS. Obviously there must be many people that have said similar things; I'd be happy with any other similar ref added in. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 21:13, 11 October 2012 (UTC)
 
I'm uncomfortable with saying python's syntax enables shorter programs. This is definitely true in certain cases with list comprehensions, but for the most part you can pack just as much into a line of C. Sometimes more, for example <pre>if (int a=call()) output(a); else output(!a);</pre>. Those two lines of C would be three lines in python. Maybe a better statement would be 'python's tersely designed and comprehensive standard library often results in shorter programs than low-level languages like C'. Python's syntax was designed to be easy to parse which made it less flexible than C. It's not syntax that makes python programs shorter, it's the standard library. [[User:Awinter cs|Awinter cs]] ([[User talk:Awinter cs|talk]]) 16:48, 8 April 2013 (UTC)
 
:I'm not clear on what you're saying. The article itself doesn't mention 'shorter programs'. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 22:03, 8 April 2013 (UTC)
 
:: It's in the first paragraph. 'Python's syntax allows programmers to express concepts in fewer lines of code'. [[User:Awinter cs|Awinter cs]] ([[User talk:Awinter cs|talk]]) 02:45, 9 April 2013 (UTC)
 
::: OK, I see what you mean. I'm not sure if I agree with the current wording either. I like the 'express concepts', because doing a dictionary of lists is trivially easy compared to C. But I don't think it's the ''syntax'' of Python that makes that so easy. Perhaps just say 'Python allows programmers to express concepts in fewer lines of code...', or 'Python allows programmers to express complex concepts'...
::: I'm having trouble with the link #11 to Code Complete - it's broken for me. I've got edition 1 of the book, and there's nothing on page 100 that's relevant. Can you get to the link? [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 03:17, 9 April 2013 (UTC)
 
:::: do you mean link [12], the google books result? It worked the second time I clicked it. It's just one of those equivalence charts saying that one statement in python is worth 6 in C. I've never understood these -- C++, if not C, could be as concise as python if we wrote loosely-typed libraries for it that are as slow as python. It's not the language, it's the libraries. Regarding the wording of this article, maybe it's okay as-is; the distinction between syntax and libraries might not mean a lot to anybody who doesn't already know the difference. [[User:Awinter cs|Awinter cs]] ([[User talk:Awinter cs|talk]]) 21:00, 11 April 2013 (UTC)
 
::::: Oh now it's working for me. Thanks. The vagaries of the internet. It's a well sourced relevant page, although it would be interesting to see the original study. I guess it gives support to the 'fewer lines' claim. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 22:59, 11 April 2013 (UTC)