Re: DIP67: Associative Ranges

2014-10-31 Thread Jakob Ovrum via Digitalmars-d
On Tuesday, 28 October 2014 at 22:44:32 UTC, Freddy wrote: http://wiki.dlang.org/DIP67 Abstraction over the build-in associative array(one type of range for containers and another type for dynamic generators). Plese criticize. Any examples of what this actually accomplishes? Maybe an example

Re: DIP67: Associative Ranges

2014-10-31 Thread Jakob Ovrum via Digitalmars-d
On Saturday, 1 November 2014 at 00:04:18 UTC, Jakob Ovrum wrote: ... opIndex and opBinaryRight are already container ... Correction: opBinaryRight!in

Re: DIP67: Associative Ranges

2014-10-31 Thread Freddy via Digitalmars-d
On Saturday, 1 November 2014 at 00:04:18 UTC, Jakob Ovrum wrote: On Tuesday, 28 October 2014 at 22:44:32 UTC, Freddy wrote: http://wiki.dlang.org/DIP67 Abstraction over the build-in associative array(one type of range for containers and another type for dynamic generators). Plese criticize.

Re: DIP67: Associative Ranges

2014-10-31 Thread H. S. Teoh via Digitalmars-d
On Sat, Nov 01, 2014 at 12:04:16AM +, Jakob Ovrum via Digitalmars-d wrote: On Tuesday, 28 October 2014 at 22:44:32 UTC, Freddy wrote: http://wiki.dlang.org/DIP67 Abstraction over the build-in associative array(one type of range for containers and another type for dynamic generators).

Re: DIP67: Associative Ranges

2014-10-29 Thread bearophile via Digitalmars-d
Brad Anderson: you rarely want to iterate through an associative array without having both the key and the value on hand. This is very false. I have tons of cases where you only iterate on values or keys. On the other hand I have suggested several times that I'd like a byPairs (that yields

Re: DIP67: Associative Ranges

2014-10-29 Thread Brad Anderson via Digitalmars-d
On Wednesday, 29 October 2014 at 06:59:09 UTC, bearophile wrote: This is very false. I have tons of cases where you only iterate on values or keys. On the other hand I have suggested several times that I'd like a byPairs (that yields keys-values tuple pairs). It happens to me too but it's

Re: DIP67: Associative Ranges

2014-10-29 Thread H. S. Teoh via Digitalmars-d
On Wed, Oct 29, 2014 at 05:23:07PM +, Brad Anderson via Digitalmars-d wrote: On Wednesday, 29 October 2014 at 06:59:09 UTC, bearophile wrote: This is very false. I have tons of cases where you only iterate on values or keys. On the other hand I have suggested several times that I'd like a

Re: DIP67: Associative Ranges

2014-10-29 Thread John Colvin via Digitalmars-d
On Wednesday, 29 October 2014 at 17:36:41 UTC, H. S. Teoh via Digitalmars-d wrote: On Wed, Oct 29, 2014 at 05:23:07PM +, Brad Anderson via Digitalmars-d wrote: On Wednesday, 29 October 2014 at 06:59:09 UTC, bearophile wrote: This is very false. I have tons of cases where you only iterate

Re: DIP67: Associative Ranges

2014-10-29 Thread Freddy via Digitalmars-d
On Wednesday, 29 October 2014 at 18:04:30 UTC, John Colvin wrote: On Wednesday, 29 October 2014 at 17:36:41 UTC, H. S. Teoh via Digitalmars-d wrote: On Wed, Oct 29, 2014 at 05:23:07PM +, Brad Anderson via Digitalmars-d wrote: On Wednesday, 29 October 2014 at 06:59:09 UTC, bearophile wrote:

Re: DIP67: Associative Ranges

2014-10-29 Thread Freddy via Digitalmars-d
On Wednesday, 29 October 2014 at 18:40:51 UTC, Freddy wrote: On Wednesday, 29 October 2014 at 18:04:30 UTC, John Colvin wrote: On Wednesday, 29 October 2014 at 17:36:41 UTC, H. S. Teoh via Digitalmars-d wrote: On Wed, Oct 29, 2014 at 05:23:07PM +, Brad Anderson via Digitalmars-d wrote: On

Re: DIP67: Associative Ranges

2014-10-29 Thread H. S. Teoh via Digitalmars-d
On Wed, Oct 29, 2014 at 06:40:50PM +, Freddy via Digitalmars-d wrote: On Wednesday, 29 October 2014 at 18:04:30 UTC, John Colvin wrote: On Wednesday, 29 October 2014 at 17:36:41 UTC, H. S. Teoh via Digitalmars-d wrote: [...] I've submitted a PR for byPair before, but it was roadblocked by

Re: DIP67: Associative Ranges

2014-10-29 Thread bearophile via Digitalmars-d
H. S. Teoh: And how would it be implemented in a way that is stable across AA implementations? Adding tuples as first-class entities in the language, and deprecating std.typecons.Tuple :-) Bye, bearophile

Re: DIP67: Associative Ranges

2014-10-29 Thread Freddy via Digitalmars-d
On Wednesday, 29 October 2014 at 19:55:14 UTC, H. S. Teoh via Digitalmars-d wrote: On Wed, Oct 29, 2014 at 06:40:50PM +, Freddy via Digitalmars-d wrote: On Wednesday, 29 October 2014 at 18:04:30 UTC, John Colvin wrote: On Wednesday, 29 October 2014 at 17:36:41 UTC, H. S. Teoh via

Re: DIP67: Associative Ranges

2014-10-29 Thread Freddy via Digitalmars-d
On Tuesday, 28 October 2014 at 22:44:32 UTC, Freddy wrote: http://wiki.dlang.org/DIP67 Abstraction over the build-in associative array(one type of range for containers and another type for dynamic generators). Plese criticize. Does any one now a better way to implement lazy associative

Re: DIP67: Associative Ranges

2014-10-29 Thread H. S. Teoh via Digitalmars-d
On Wed, Oct 29, 2014 at 11:33:53PM +, Freddy via Digitalmars-d wrote: On Wednesday, 29 October 2014 at 19:55:14 UTC, H. S. Teoh via Digitalmars-d wrote: [...] And how would it be implemented in a way that is stable across AA implementations? --T in std.range auto

Re: DIP67: Associative Ranges

2014-10-29 Thread Xinok via Digitalmars-d
On Thursday, 30 October 2014 at 00:10:47 UTC, H. S. Teoh via Digitalmars-d wrote: On Wed, Oct 29, 2014 at 11:33:53PM +, Freddy via Digitalmars-d wrote: On Wednesday, 29 October 2014 at 19:55:14 UTC, H. S. Teoh via Digitalmars-d wrote: [...] And how would it be implemented in a way that is

DIP67: Associative Ranges

2014-10-28 Thread Freddy via Digitalmars-d
http://wiki.dlang.org/DIP67 Abstraction over the build-in associative array(one type of range for containers and another type for dynamic generators). Plese criticize.

Re: DIP67: Associative Ranges

2014-10-28 Thread Brad Anderson via Digitalmars-d
On Tuesday, 28 October 2014 at 22:44:32 UTC, Freddy wrote: http://wiki.dlang.org/DIP67 Abstraction over the build-in associative array(one type of range for containers and another type for dynamic generators). Plese criticize. It's kind of a weird proposal to be honest. Ranges primitives are