Reader Comments
Post a new comment on this article
Post Your Discussion Comment
Please follow our guidelines for comments and review our competing interests policy. Comments that do not conform to our guidelines will be promptly removed and the user account disabled. The following must be avoided:
- Remarks that could be interpreted as allegations of misconduct
- Unsupported assertions or statements
- Inflammatory or insulting language
Thank You!
Thank you for taking the time to flag this posting; we review flagged postings on a regular basis.
closeC++?
Posted by Winawer on 16 Mar 2008 at 06:55 GMT
C programmers will find lists similar to vectors
http://ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.0030199#article1.body1.sec3.sec1.sec2.boxed-text1.sec1.sec2.p1
C doesn't have a mutable vector data type; perhaps you meant C++'s Vector, which is part of the STL. C's arrays are much less flexible (yet probably at least a little faster) than Python's list type.
RE: C++? (Response from the author)
PLOS_CompBiol replied to Winawer on 26 Mar 2008 at 18:29 GMT
You are right on the difference between C++ vectors and C arrays. But I didn't mean that C has a mutable vector data type. I wanted to point out that C programmers will anyway find it similar (arrays or vector to list) since that is what they know. Both data types share the property that can store several values at once (unlike a scalar type) and they can be walked over and indexed. Python list has its own unique properties, but that statement was made in order to show C programmers something they know to learn something new.
Maybe the problem lies in the fact that in Spanish "array" is translated as a "vector". So I agree that the article could be changed from "C programmers will find lists similar to vectors." to "C++ programmers will find lists similar to vectors." or to "C programmers will find lists similar to arrays." Both proposed statements are true, choosing one from them is a matter of taste.