novice questions 2

This is a discussion on novice questions 2 within the Eiffel forums in Programming Languages category; 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?...

Go Back   Application Development Forum > Programming Languages > Eiffel

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 05-13-2008, 12:16 AM
jhc0033@gmail.com
Guest
 
Default novice questions 2

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?
Reply With Quote
  #2  
Old 05-13-2008, 01:59 AM
Jim Cochrane
Guest
 
Default Re: novice questions 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.

--

Reply With Quote
  #3  
Old 05-13-2008, 04:13 AM
jhc0033@gmail.com
Guest
 
Default Re: novice questions 2

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) ?

Reply With Quote
  #4  
Old 05-13-2008, 04:31 AM
Eric Bezault
Guest
 
Default Re: novice questions 2

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
Reply With Quote
  #5  
Old 05-29-2008, 03:55 AM
Ulrich Windl
Guest
 
Default Re: novice questions 2

"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
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:35 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.