in reply to Re^3: Perl vs C
in thread Perl vs C
Please explain what you think the difference is between a Perl array and a Perl List.
When someone talks of lists in Perl, they are usually talking about one of the following:
There is also "list context", a context in which expressions can be evaluated.
In contrast, an array is a type of variable. There is no list variable type.
I'd be hard pressed to find similarities between list values, list operators, list context and array variables because values, operators, contexts and variables are fundamentally different from each other. It's not just nomenclature.
I am still not "getting it". A simple Perl list is similar to a C char ** array
A Perl array is similar to T* array in C, except it automatically resizes itself when needed (like C++'s std::vector). Due to C's type system, C doesn't have anything similar to Perl lists. (Same goes for C++.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Perl vs C
by Marshall (Canon) on Mar 14, 2009 at 19:58 UTC | |
by chromatic (Archbishop) on Mar 14, 2009 at 21:40 UTC | |
by ikegami (Patriarch) on Mar 14, 2009 at 23:13 UTC | |
by Marshall (Canon) on Mar 16, 2009 at 11:11 UTC | |
by ikegami (Patriarch) on Mar 16, 2009 at 15:06 UTC | |
|