On Wednesday, 17 September 2014 at 17:34:29 UTC, Ola Fosheim
Grøstad wrote:
On Wednesday, 17 September 2014 at 16:06:06 UTC, Dicebot wrote:
I am rather terrible at calculus and math in general, is it
possible to provide a very short example of errors that can be
detected with such system?
Try
On Wednesday, 17 September 2014 at 16:06:06 UTC, Dicebot wrote:
I am rather terrible at calculus and math in general, is it
possible to provide a very short example of errors that can be
detected with such system?
Try to read it backwards, and only the last page. Much easier! :-)
It appears t
On Sunday, 14 September 2014 at 22:12:23 UTC, bearophile wrote:
This paper suggests a way to improve the detection of errors
inside C++-style templated code without reducing expressivity
of the templates (and without annotations or Concepts), I
presume the same ideas are usable in D:
"Early D
On 9/14/14, 3:12 PM, bearophile wrote:
This paper suggests a way to improve the detection of errors inside
C++-style templated code without reducing expressivity of the templates
(and without annotations or Concepts), I presume the same ideas are
usable in D:
"Early Detection of Type Errors in C
This paper suggests a way to improve the detection of errors
inside C++-style templated code without reducing expressivity of
the templates (and without annotations or Concepts), I presume
the same ideas are usable in D:
"Early Detection of Type Errors in C++ Templates" by Sheng Chen,
Martin
I believe this is a flaw in template design, maybe intentional or
overlooked or possibly my own lack of knowledge.
I have a module with templates in it. I use these templates to
built up compile time constructs such as methods, properties, and
fields for various things like classes and interfa
Thanks for that bearophile - I'll get myself subscribed right away.
Bye for now,
Luke
On Sun, 23 Jan 2011 09:17:05 -0500, "bearophile"
said:
> Luke J. West:
>
> > Hi,
> >
> > I want to specialize a template function - call it print() - for three
> > cases: classes, structs and arrays. Ideally
Luke J. West:
> Hi,
>
> I want to specialize a template function - call it print() - for three
> cases: classes, structs and arrays. Ideally I'd like something that
> looks 'functional' like a proper specialization, but perhaps I need to
> use "static if". I'm still at the beginning of my journey
Luke J. West wrote:
Hi,
I want to specialize a template function - call it print() - for three
cases: classes, structs and arrays. Ideally I'd like something that
looks 'functional' like a proper specialization, but perhaps I need to
use "static if". I'm still at the beginning of my journey wi
Hi,
I want to specialize a template function - call it print() - for three
cases: classes, structs and arrays. Ideally I'd like something that
looks 'functional' like a proper specialization, but perhaps I need to
use "static if". I'm still at the beginning of my journey with D so I'd
be grateful
Bill Baxter wrote:
On Wed, Nov 18, 2009 at 3:16 AM, retard wrote:
There's probably a confusion here. It evaluates lazily the value of
factorial!(), but its type (which happens to be infinitely recursive must
be evaluated eagerly in order to infer the type of the ternary op.
That makes sense
On Wed, 18 Nov 2009 14:50:42 +0300, Bill Baxter wrote:
On Wed, Nov 18, 2009 at 3:36 AM, retard wrote:
Wed, 18 Nov 2009 03:31:11 -0800, Bill Baxter wrote:
On Wed, Nov 18, 2009 at 3:16 AM, retard wrote:
Wed, 18 Nov 2009 03:10:57 -0800, Bill Baxter wrote:
Didn't this used to work?
templat
On Wed, Nov 18, 2009 at 3:36 AM, retard wrote:
> Wed, 18 Nov 2009 03:31:11 -0800, Bill Baxter wrote:
>
>> On Wed, Nov 18, 2009 at 3:16 AM, retard wrote:
>>> Wed, 18 Nov 2009 03:10:57 -0800, Bill Baxter wrote:
>>>
Didn't this used to work?
template factorial(int i) {
enum f
Wed, 18 Nov 2009 03:31:11 -0800, Bill Baxter wrote:
> On Wed, Nov 18, 2009 at 3:16 AM, retard wrote:
>> Wed, 18 Nov 2009 03:10:57 -0800, Bill Baxter wrote:
>>
>>> Didn't this used to work?
>>>
>>> template factorial(int i) {
>>> enum factorial = (i==0) ? 1 : i*factorial!(i-1);
>>> }
>>>
>>> W
On Wed, 18 Nov 2009 03:10:57 -0800, Bill Baxter
wrote:
>Didn't this used to work?
>
>template factorial(int i) {
>enum factorial = (i==0) ? 1 : i*factorial!(i-1);
>}
>
>With DMD 2.036 I'm getting:
> Error: template instance factorial!(-495) recursive expansion
>
>Seems like it expands both b
On Wed, Nov 18, 2009 at 3:16 AM, retard wrote:
> Wed, 18 Nov 2009 03:10:57 -0800, Bill Baxter wrote:
>
>> Didn't this used to work?
>>
>> template factorial(int i) {
>> enum factorial = (i==0) ? 1 : i*factorial!(i-1);
>> }
>>
>> With DMD 2.036 I'm getting:
>> Error: template instance factori
Wed, 18 Nov 2009 03:10:57 -0800, Bill Baxter wrote:
> Didn't this used to work?
>
> template factorial(int i) {
> enum factorial = (i==0) ? 1 : i*factorial!(i-1);
> }
>
> With DMD 2.036 I'm getting:
> Error: template instance factorial!(-495) recursive expansion
>
> Seems like it expands
Didn't this used to work?
template factorial(int i) {
enum factorial = (i==0) ? 1 : i*factorial!(i-1);
}
With DMD 2.036 I'm getting:
Error: template instance factorial!(-495) recursive expansion
Seems like it expands both branches regardless of the condition.
And seems to me like it should
18 matches
Mail list logo