Topic: conditional concept checking


Author: andy@servocomm.freeserve.co.uk
Date: 27 Jun 2005 21:40:02 GMT
Raw View
Francis Glassborow wrote:
> In article <1119620270.997481.262330@g47g2000cwa.googlegroups.com>,
> andy@servocomm.freeserve.co.uk writes
> >Hi,
> >In a reply in the "Concepts - What is the State of the Art, was:Likely
> >C++0x features" thread, on Aug 21 2004, 6:08 pm I proposed Concept
> >Checking using the if keyword.
> >
> >I see that there are now two proposals running with this idea:
> >
> >N1696: "Language support for restricted templates"
> >N1758: "Concepts for C++0x" , 3.2.5 Specifying constraints
> >
> >I believe mine is the first mention of this idea on comp.std.c++.
> >Any chance of an attribution?
>
> I doubt it as the exploration of concepts started much before that date
> and the use of 'if' seems rather obvious (though some of us have strong
> queries about its use)

hmmm......

ideas often become 'obvious' immediately after their published ;-).

If the idea of using a conditional clause to replace enable_if (from
which idea to concepts BTW, according to David Abrahams, is 'a
stretch') is obvious then it will have been previously published;
Otherwise as I have now informed the author of n1696 in particular of
my prior publication of a very similar idea to that contained therein,
then it would seem fitting to me that I should get an attribution in
papers mentioning the idea.

Andy Little

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]





Author: David Abrahams <dave@boost-consulting.com>
Date: Tue, 28 Jun 2005 01:45:26 CST
Raw View
andy@servocomm.freeserve.co.uk writes:

> Francis Glassborow wrote:
>> In article <1119620270.997481.262330@g47g2000cwa.googlegroups.com>,
>> andy@servocomm.freeserve.co.uk writes
>> >Hi,
>> >In a reply in the "Concepts - What is the State of the Art, was:Likely
>> >C++0x features" thread, on Aug 21 2004, 6:08 pm I proposed Concept
>> >Checking using the if keyword.
>> >
>> >I see that there are now two proposals running with this idea:
>> >
>> >N1696: "Language support for restricted templates"
>> >N1758: "Concepts for C++0x" , 3.2.5 Specifying constraints
>> >
>> >I believe mine is the first mention of this idea on comp.std.c++.
>> >Any chance of an attribution?
>>
>> I doubt it as the exploration of concepts started much before that date
>> and the use of 'if' seems rather obvious (though some of us have strong
>> queries about its use)
>
> hmmm......
>
> ideas often become 'obvious' immediately after their published ;-).
>
> If the idea of using a conditional clause to replace enable_if (from
> which idea to concepts BTW, according to David Abrahams, is 'a
> stretch')

No, it's a very short step.  I said that _equating_ the two ideas is a
stretch.  The general idea of in-language support for concepts a la
N1758 came long before it was discovered that we could implement a
crippled version of the idea using enable_if, which came before you
proposed using "if" to achieve a similarly limited goal.  "Where"
clauses have been around for a long time; here's a paper from 1995:

  http://portal.acm.org/citation.cfm?id=217839.217852

Also, the idea of using the "if" keyword to write constraints on
pattern matching is just not all that original.
http://www.cs.ucl.ac.uk/teaching/3C11/B11aBook.ps for example.

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]





Author: andy@servocomm.freeserve.co.uk
Date: 28 Jun 2005 15:10:08 GMT
Raw View
> David Abrahams wrote:

> The general idea of in-language support for concepts a la
> N1758 came long before it was discovered that we could implement a
> crippled version of the idea using enable_if, which came before you
> proposed using "if" to achieve a similarly limited goal.

Thanks for the attribution. That is all I am seeking here.

> "Where"
> clauses have been around for a long time; here's a paper from 1995:
>
>   http://portal.acm.org/citation.cfm?id=217839.217852

I cant access this link.

> Also, the idea of using the "if" keyword to write constraints on
> pattern matching is just not all that original.
> http://www.cs.ucl.ac.uk/teaching/3C11/B11aBook.ps for example.

My proposal was very specific regarding useable syntax for modern C++.

Andy Little

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]





Author: dave@boost-consulting.com (David Abrahams)
Date: Tue, 28 Jun 2005 16:14:49 GMT
Raw View
andy@servocomm.freeserve.co.uk writes:

>> David Abrahams wrote:
>
>> The general idea of in-language support for concepts a la
>> N1758 came long before it was discovered that we could implement a
>> crippled version of the idea using enable_if, which came before you
>> proposed using "if" to achieve a similarly limited goal.
>
> Thanks for the attribution.

Wha??

> That is all I am seeking here.
>
>> "Where"
>> clauses have been around for a long time; here's a paper from 1995:
>>
>>   http://portal.acm.org/citation.cfm?id=217839.217852
>
> I cant access this link.

http://citeseer.ist.psu.edu/day95subtypes.html

>> Also, the idea of using the "if" keyword to write constraints on
>> pattern matching is just not all that original.
>> http://www.cs.ucl.ac.uk/teaching/3C11/B11aBook.ps for example.
>
> My proposal was very specific regarding useable syntax for modern
> C++.

Sure.

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]





Author: dave@boost-consulting.com (David Abrahams)
Date: Fri, 24 Jun 2005 20:03:51 GMT
Raw View
andy@servocomm.freeserve.co.uk writes:

> Hi,
> In a reply in the "Concepts - What is the State of the Art, was:Likely
> C++0x features" thread, on Aug 21 2004, 6:08 pm I proposed Concept
> Checking using the if keyword.
>
> I see that there are now two proposals running with this idea:
>
> N1696: "Language support for restricted templates"
> N1758: "Concepts for C++0x" , 3.2.5 Specifying constraints

I see the "if" keyword used for constraints in N1696, but not in
N1758.

> I believe mine is the first mention of this idea on comp.std.c++.
> Any chance of an attribution?

I think if you want an attribution, you'll need to contact the
respective authors!  However, the committee papers can't be changed or
amended once they go out in a mailing, so the best they will be able
to do is to change "un-official" copies of the document.

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]





Author: andy@servocomm.freeserve.co.uk
Date: Fri, 24 Jun 2005 17:57:09 CST
Raw View
David Abrahams wrote:

> I see the "if" keyword used for constraints in N1696, but not in
> N1758.

See the reference to Dim04 in paragraph 3.3.8. OTOH I (just now) see an
article earlier by Jaakko Jarvi mentioning something like this syntax
in April 04 some time before my contribution, except the if ("where")
clause is post definition and only for functions not class templates.

> > I believe mine is the first mention of this idea on comp.std.c++.
> > Any chance of an attribution?
>
> I think if you want an attribution, you'll need to contact the
> respective authors!  However, the committee papers can't be changed or
> amended once they go out in a mailing, so the best they will be able
> to do is to change "un-official" copies of the document.

Theres always the next revision...

regards
Andy Little

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]





Author: dave@boost-consulting.com (David Abrahams)
Date: Sat, 25 Jun 2005 03:01:37 GMT
Raw View
andy@servocomm.freeserve.co.uk writes:

> David Abrahams wrote:
>
>> I see the "if" keyword used for constraints in N1696, but not in
>> N1758.
>
> See the reference to Dim04 in paragraph 3.3.8. OTOH I (just now) see an
> article earlier by Jaakko Jarvi mentioning something like this syntax
> in April 04 some time before my contribution,

He is one of the authors of N1758.

> except the if ("where") clause is post definition and only for
> functions not class templates.

The fact that they cite the other paper doesn't mean they should
automatically cite your NG posting, IMO.  But it's for you to take up
with the authors.

For your information, the idea of restricting class templates as well
as function templates has been around for a long time (see D&E) and
was certainly a concern for Jaakko as early as 2003 (see
http://boost.org/libs/utility/enable_if.html).  Your assertion in
http://groups-beta.google.com/group/comp.std.c++/msg/2a4498491241bd3c?hl=en
that enable_if only works for class templates was incorrect, as you
yourself concede in
http://groups-beta.google.com/group/comp.std.c++/msg/4c5e3dbec702a456?hl=en

So I'm not sure which article by Jaakko you're referring to...

I also think equating the use of "where" in discussion of true
language support for concepts (as in N1758) with simple on/off
enabling that enable_if does (and "if" does in the Dimov paper) is a
stretch at best.

>> > I believe mine is the first mention of this idea on comp.std.c++.
>> > Any chance of an attribution?
>>
>> I think if you want an attribution, you'll need to contact the
>> respective authors!  However, the committee papers can't be changed or
>> amended once they go out in a mailing, so the best they will be able
>> to do is to change "un-official" copies of the document.
>
> Theres always the next revision...

Like I said, take it up with the authors.

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]





Author: francis@robinton.demon.co.uk (Francis Glassborow)
Date: Mon, 27 Jun 2005 15:21:05 GMT
Raw View
In article <1119620270.997481.262330@g47g2000cwa.googlegroups.com>,
andy@servocomm.freeserve.co.uk writes
>Hi,
>In a reply in the "Concepts - What is the State of the Art, was:Likely
>C++0x features" thread, on Aug 21 2004, 6:08 pm I proposed Concept
>Checking using the if keyword.
>
>I see that there are now two proposals running with this idea:
>
>N1696: "Language support for restricted templates"
>N1758: "Concepts for C++0x" , 3.2.5 Specifying constraints
>
>I believe mine is the first mention of this idea on comp.std.c++.
>Any chance of an attribution?

I doubt it as the exploration of concepts started much before that date
and the use of 'if' seems rather obvious (though some of us have strong
queries about its use)


--
Francis Glassborow      ACCU
Author of 'You Can Do It!' see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]





Author: andy@servocomm.freeserve.co.uk
Date: 24 Jun 2005 14:10:02 GMT
Raw View
Hi,
In a reply in the "Concepts - What is the State of the Art, was:Likely
C++0x features" thread, on Aug 21 2004, 6:08 pm I proposed Concept
Checking using the if keyword.

I see that there are now two proposals running with this idea:

N1696: "Language support for restricted templates"
N1758: "Concepts for C++0x" , 3.2.5 Specifying constraints

I believe mine is the first mention of this idea on comp.std.c++.
Any chance of an attribution?

Andy Little

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]