| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Forgot one: Does Eiffel have resizeable arrays? (something like C++ std::vector). If you define std::vector<int> for example, the memory layout of the elements is similar to int[] (i.e. it's unboxed), which is why STL vectors are as fast as C arrays, but you can add elements to them. Does Eiffel (SmartEiffel) offer similar facilities? |
|
#2
| |||
| |||
| On 2008-05-13, jhc0033@gmail.com <jhc0033@gmail.com> wrote: > Forgot one: > > Does Eiffel have resizeable arrays? (something like C++ std::vector). > If you define std::vector<int> for example, the memory layout of the > elements is similar to int[] (i.e. it's unboxed), which is why STL > vectors are as fast as C arrays, but you can add elements to them. > Does Eiffel (SmartEiffel) offer similar facilities? yes. -- |
|
#3
| |||
| |||
| On May 12, 10:59 pm, Jim Cochrane <allergic-to-s...@no-spam- allowed.org> wrote: > On 2008-05-13, jhc0...@gmail.com <jhc0...@gmail.com> wrote: > > > Forgot one: > > > Does Eiffel have resizeable arrays? > ... > > yes. What are they called (so I can look them up in the docs) ? |
|
#4
| |||
| |||
| jhc0033@gmail.com wrote: > On May 12, 10:59 pm, Jim Cochrane <allergic-to-s...@no-spam- > allowed.org> wrote: >> On 2008-05-13, jhc0...@gmail.com <jhc0...@gmail.com> wrote: >> >>> Forgot one: >>> Does Eiffel have resizeable arrays? >> ... >> >> yes. > > What are they called (so I can look them up in the docs) ? ARRAY -- Eric Bezault mailto:ericb@gobosoft.com http://www.gobosoft.com |
|
#5
| |||
| |||
| "jhc0033@gmail.com" <jhc0033@gmail.com> writes: > Forgot one: > > Does Eiffel have resizeable arrays? (something like C++ std::vector). > If you define std::vector<int> for example, the memory layout of the > elements is similar to int[] (i.e. it's unboxed), which is why STL > vectors are as fast as C arrays, but you can add elements to them. > Does Eiffel (SmartEiffel) offer similar facilities? An ARRAY in Eiffel is typically one chunk of memory for the items. There are also linked lists. Not in every case one chunk of memory has the best performance... Ulrich |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.