Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #18997 > unrolled thread

template metaprogramming in C?

Started byRui Maciel <rui.maciel@gmail.com>
First post2012-03-24 11:57 +0000
Last post2012-03-26 00:54 -0700
Articles 6 on this page of 46 — 20 participants

Back to article view | Back to comp.lang.c


Contents

  template metaprogramming in C? Rui Maciel <rui.maciel@gmail.com> - 2012-03-24 11:57 +0000
    Re: template metaprogramming in C? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-03-24 07:25 -0700
      Re: template metaprogramming in C? Markus Wichmann <nullplan@gmx.net> - 2012-03-26 11:46 +0200
        Re: template metaprogramming in C? Philipp Klaus Krause <pkk@spth.de> - 2012-03-27 21:09 +0200
          Re: template metaprogramming in C? Markus Wichmann <nullplan@gmx.net> - 2012-03-28 09:25 +0200
            Re: template metaprogramming in C? James Kuyper <jameskuyper@verizon.net> - 2012-03-28 06:59 -0400
        Re: template metaprogramming in C? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-03-28 12:13 -0700
        Re: template metaprogramming in C? James Dow Allen <jdallen2000@yahoo.com> - 2012-04-01 02:47 -0700
    Re: template metaprogramming in C? Jens Gustedt <jens.gustedt@loria.fr> - 2012-03-24 18:01 +0100
    Re: template metaprogramming in C? Nobody <nobody@nowhere.com> - 2012-03-24 22:57 +0000
      Re: template metaprogramming in C? William Ahern <william@wilbur.25thandClement.com> - 2012-03-24 18:29 -0700
        Re: template metaprogramming in C? Ian Collins <ian-news@hotmail.com> - 2012-03-25 15:03 +1300
        Re: template metaprogramming in C? nick_keighley_nospam@hotmail.com - 2012-03-25 05:32 -0700
    Re: template metaprogramming in C? BGB <cr88192@hotmail.com> - 2012-03-24 17:02 -0700
    Re: template metaprogramming in C? jacob navia <jacob@spamsink.net> - 2012-03-25 01:21 +0100
      Re: template metaprogramming in C? Philipp Klaus Krause <pkk@spth.de> - 2012-03-27 21:17 +0200
        Re: template metaprogramming in C? jacob navia <jacob@spamsink.net> - 2012-03-28 11:10 +0200
          Re: template metaprogramming in C? Nils M Holm <news2009@t3x.org> - 2012-03-28 10:05 +0000
            Re: template metaprogramming in C? Willem <willem@toad.stack.nl> - 2012-03-28 13:36 +0000
              Re: template metaprogramming in C? Nils M Holm <news2009@t3x.org> - 2012-03-28 14:40 +0000
          Re: template metaprogramming in C? Kaz Kylheku <kaz@kylheku.com> - 2012-03-28 18:32 +0000
            Re: template metaprogramming in C? jacob navia <jacob@spamsink.net> - 2012-03-28 22:27 +0200
              Re: template metaprogramming in C? Kaz Kylheku <kaz@kylheku.com> - 2012-03-28 21:02 +0000
          Re: template metaprogramming in C? Nobody <nobody@nowhere.com> - 2012-03-29 16:30 +0100
            Re: template metaprogramming in C? jacob navia <jacob@spamsink.net> - 2012-03-29 23:39 +0200
              Re: template metaprogramming in C? "BartC" <bc@freeuk.com> - 2012-03-29 23:36 +0100
                Re: template metaprogramming in C? Kaz Kylheku <kaz@kylheku.com> - 2012-03-30 00:55 +0000
              Re: template metaprogramming in C? Kaz Kylheku <kaz@kylheku.com> - 2012-03-30 00:32 +0000
                Re: template metaprogramming in C? "BartC" <bc@freeuk.com> - 2012-03-30 10:52 +0100
                  Re: template metaprogramming in C? jacob navia <jacob@spamsink.net> - 2012-04-01 09:36 +0200
              Re: template metaprogramming in C? Ian Collins <ian-news@hotmail.com> - 2012-03-30 16:32 +1300
                Re: template metaprogramming in C? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-03-31 01:52 -0700
      Re: template metaprogramming in C? ImpalerCore <jadill33@gmail.com> - 2012-03-28 08:48 -0700
        Re: template metaprogramming in C? "io_x" <a@b.c.invalid> - 2012-04-05 12:18 +0200
          Re: template metaprogramming in C? "io_x" <a@b.c.invalid> - 2012-04-05 13:08 +0200
            Re: template metaprogramming in C? "io_x" <a@b.c.invalid> - 2012-04-05 13:36 +0200
              Re: template metaprogramming in C? pete <pfiland@mindspring.com> - 2012-04-06 18:43 -0400
                Re: template metaprogramming in C? pete <pfiland@mindspring.com> - 2012-04-06 19:20 -0400
        Re: template metaprogramming in C? "io_x" <a@b.c.invalid> - 2012-04-05 13:08 +0200
    Re: template metaprogramming in C? William Ahern <william@wilbur.25thandClement.com> - 2012-03-24 19:01 -0700
      Re: template metaprogramming in C? William Ahern <william@wilbur.25thandClement.com> - 2012-03-24 19:10 -0700
    Re: template metaprogramming in C? Ian Collins <ian-news@hotmail.com> - 2012-03-25 15:25 +1300
      Re: template metaprogramming in C? Rui Maciel <rui.maciel@gmail.com> - 2012-03-25 15:13 +0100
        Re: template metaprogramming in C? Ian Collins <ian-news@hotmail.com> - 2012-03-26 07:10 +1300
          Re: template metaprogramming in C? Rui Maciel <rui.maciel@gmail.com> - 2012-03-25 20:31 +0100
            Re: template metaprogramming in C? nick_keighley_nospam@hotmail.com - 2012-03-26 00:54 -0700

Page 3 of 3 — ← Prev page 1 2 [3]


#19020

FromWilliam Ahern <william@wilbur.25thandClement.com>
Date2012-03-24 19:10 -0700
Message-ID<ceb249-qns.ln1@wilbur.25thandClement.com>
In reply to#19018
William Ahern <william@wilbur.25thandclement.com> wrote:
> Rui Maciel <rui.maciel@gmail.com> wrote:
> > What are your thoughts on adding a standard form of proper template 
> > metaprogramming to the C programming language? 

> There are three things you can use to get the job done most of the time,
> IMO:

>         1) Variable argument macros from C99,

>         2) _Restrict from C11, and

Oops. I meant _Generic.

[toc] | [prev] | [next] | [standalone]


#19021

FromIan Collins <ian-news@hotmail.com>
Date2012-03-25 15:25 +1300
Message-ID<9t7dvvF3fiU6@mid.individual.net>
In reply to#18997
On 03/25/12 12:57 AM, Rui Maciel wrote:
> What are your thoughts on adding a standard form of proper template
> metaprogramming to the C programming language?

Considering its sanity damaging effects in C++, not a great idea!

You can't do template meta-programming without some form of templates, 
which I doubt we will ever see in C.

-- 
Ian Collins

[toc] | [prev] | [next] | [standalone]


#19027

FromRui Maciel <rui.maciel@gmail.com>
Date2012-03-25 15:13 +0100
Message-ID<jkn95q$u27$1@speranza.aioe.org>
In reply to#19021
Ian Collins wrote:

> Considering its sanity damaging effects in C++, not a great idea!

What are "these sanity damaging effects"?


Rui Maciel

[toc] | [prev] | [next] | [standalone]


#19030

FromIan Collins <ian-news@hotmail.com>
Date2012-03-26 07:10 +1300
Message-ID<9t95chF3fiU8@mid.individual.net>
In reply to#19027
On 03/26/12 03:13 AM, Rui Maciel wrote:
> Ian Collins wrote:
>
>> Considering its sanity damaging effects in C++, not a great idea!
>
> What are "these sanity damaging effects"?

Have you ever tried any serous meta-programming in C++?

-- 
Ian Collins

[toc] | [prev] | [next] | [standalone]


#19031

FromRui Maciel <rui.maciel@gmail.com>
Date2012-03-25 20:31 +0100
Message-ID<jknrpn$f2a$1@speranza.aioe.org>
In reply to#19030
Ian Collins wrote:

> On 03/26/12 03:13 AM, Rui Maciel wrote:
>> Ian Collins wrote:
>>
>>> Considering its sanity damaging effects in C++, not a great idea!
>>
>> What are "these sanity damaging effects"?
> 
> Have you ever tried any serous meta-programming in C++?

That will depend on your definition of "serious meta-programming".  Even 
then, I don't see how your opinion on template metaprogramming could vary 
depending on someone else's experience with template metaprogramming.


Rui Maciel

[toc] | [prev] | [next] | [standalone]


#19038

Fromnick_keighley_nospam@hotmail.com
Date2012-03-26 00:54 -0700
Message-ID<27035153.1388.1332748474419.JavaMail.geo-discussion-forums@vbxq27>
In reply to#19031
On Sunday, March 25, 2012 8:31:07 PM UTC+1, Rui Maciel wrote:
> Ian Collins wrote:
> 
> > On 03/26/12 03:13 AM, Rui Maciel wrote:
> >> Ian Collins wrote:
> >>
> >>> Considering its sanity damaging effects in C++, not a great idea!
> >>
> >> What are "these sanity damaging effects"?
> > 
> > Have you ever tried any serous meta-programming in C++?
> 
> That will depend on your definition of "serious meta-programming".  Even 
> then, I don't see how your opinion on template metaprogramming could vary 
> depending on someone else's experience with template metaprogramming.

i suppose he was wondering if you'd dug deeply into TMP if you couldn't see the sanity bending. What was it... concepts they had to drop from the C++ standard because even very smart people were struggling with it.

from wikipedia: "the syntax and idioms of template metaprogramming are esoteric compared to conventional C++ programming, and template metaprograms can be very difficult to understand"

though it goes on to say programs can be shorter and esier to understand by people familiar with TMP

[toc] | [prev] | [standalone]


Page 3 of 3 — ← Prev page 1 2 [3]

Back to top | Article view | comp.lang.c


csiph-web