This is a heavily overloaded naming space - especially when you consider 
code.matrix as well, and usage of these words in mathematical / scientific 
communities. 

Data scientists generally expect a "vector" to be a 1D collection of 
numeric values, in the same sense that a "matrix" is a 2D collection of 
numeric values. Sometimes "array" is also used as a generalisation of this 
to mean N-Dimensional arrays (tensors and suchlike), e.g. in NumPy.

I would avoid using "array" when you mean a Clojure Persistent Vector. 
"array" is most likely referring to the host platform array type.

Whenever there is a potential for confusion, I always find it is helpful to 
add an extra word to resolve the ambiguity, e.g.
- 1D vector / 2D matrix / ND array - when talking about scientific / 
mathematical arrays (typically in a core.matrix context)
- Persistent Vector / Clojure Vector - when talking about a Clojure 
persistent vector data structure
- Java Vector - when talking about the old java.util.Vector (not that 
anyone should be using it nowadays, but still it's there....)
- Java array - when talking about an Object[], double[] etc. (this seems to 
be the convention in Clojure docstrings for aget, alength etc.)

Hope that adds some clarity....

On Thursday, 11 July 2013 02:48:38 UTC+1, vra...@gmail.com wrote:
>
> I see that Lists and Vectors are similar, but have different uses and for 
> logical reasons. My question may be more about language of datatypes in 
> Clojure than usage.
>
> Is it appropriate to use the term Array and Vector interchangeably when 
> writing documentation about Clojure/EDN for non-Clojure programmers? (1-- 
> "Vector" can be a difficult concept to "map" in English without context, 
> for instance: "so it's a direction as well as a value?") (2-- Map (Clojure) 
> / Dict (Python) / Tuple (Python) / Object (JavaScript) / Hash (Ruby), 
> there's probably no resolution there.)
>
> I'm hesitant to use the word Array interchangeably with Vector in 
> technical specs since Array occurs in Clojure at least as array-map and 
> to-array, which aren't the same as a Vector. On the other hand, "Array" 
> would seem especially interchangeable in documentation when talking about 
> Clojure in context of ClojureScript, but descriptive language about Clojure 
> should probably stay consistent regardless of the hosting programming 
> language.
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to