Re: [Plplot-devel] Redacted dimension arguments

2016-01-19 Thread Alan W. Irwin
On 2016-01-19 07:50- Arjen Markus wrote: > Hi Alan, > > > >> -Original Message- >> From: Alan W. Irwin [mailto:ir...@beluga.phys.uvic.ca] >> Sent: Tuesday, January 19, 2016 4:47 AM >> To: PLplot development list >> Subject: [Plplot-devel] Redacted dimension arguments >> ..., I came up

Re: [Plplot-devel] Redacted dimension arguments

2016-01-19 Thread Phil Rosenberg
I'm perhaps less keen on the idea of using the minimum dimension. Passing unequal sized arrays is clearly and error and so I think we should flag it is such is the loudest way possible so the user can fix it. I think the times when I have often got this wrong are off by one cases and getting x and

Re: [Plplot-devel] Redacted dimension arguments

2016-01-19 Thread Phil Rosenberg
I just realised I forgot one thing There isn't a standard 2D container in C++, so you have to create a vector of vectors, something like std::vector> myMatrix; However a lot of people don't like this as it is generally considered rather slow. So I think there are lots of other things people use i

Re: [Plplot-devel] Redacted dimension arguments

2016-01-19 Thread Phil Rosenberg
Oh and a final point. We should think carefully before removing the forms where we pass in a raw pointer and a number of elements. There are cases where only a raw pointer will do, such as when the array class doesn't have a size method or the array class uses () instead of [] for element access. A

Re: [Plplot-devel] Redacted dimension arguments

2016-01-19 Thread Alan W. Irwin
On 2016-01-19 12:32- Phil Rosenberg wrote: > I'm perhaps less keen on the idea of using the minimum dimension. > Passing unequal sized arrays is clearly and error and so I think we > should flag it is such is the loudest way possible so the user can fix > it. I think the times when I have ofte

Re: [Plplot-devel] Redacted dimension arguments

2016-01-19 Thread Alan W. Irwin
On 2016-01-19 13:07- Phil Rosenberg wrote: > Oh and a final point. We should think carefully before removing the > forms where we pass in a raw pointer and a number of elements. My own feeling is the advantages of full-featured arrays outweigh the simplicity (but also dangers) of C-style arra