<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 30, 2010, at 9:32 AM, Jay K wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px; ">> Recently I met these... Isn't it nice, to find your error happening somewhere in some .h file you never heard of?<br><br><br>The error messages are better these days.<br></span></span></blockquote><div><br></div>My experience is as recent as Snow Leopard, with 10.6.5 update.</div><div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px; ">It is true they were terrible for a long time.<br>Don't Modula-3 generics have the same problem?<br>At least in the C++ case:<br> - the errors aren't in generated files<span class="Apple-converted-space"> </span><br></span></span></blockquote><div><br></div>They are generated, but they are exact source you would "generate" for it. Aren't they? And you have them to step through with debugger. At least, I never hit a wall with them, like I did with that .h for vectors.</div><div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px; "> - you don't have to explicitly instantiate everything "in the build system"<br></span></span></blockquote><div><br></div>That would be a killing experience, to add even more complexity to Makefiles :).</div><div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px; "> - for function templates, you never have to instantiate anything<br> The automatic deduction of function template parameters is very powerful.<br> You have to try it.<br> I *believe* it enables a style of programming similar to ML, esp. when combined with the more recent<br> feature "auto".<br></span></span></blockquote><div><br></div>A style is something I'd happily trade for discipline. I like to find my place in 10 year old project in minutes, and I like to not think about releases and subreleases of language spec (!??!!?) happening during a lifetime of my project.</div><div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px; ">It is also true that templates seem to be largely accidental in what they allow.<br>It seems they were designed with two primary applications:<br> std::vector<br> std::min/max</span></span></blockquote></div><br><div>There's folk saying here, it goes like: "To kill an ox for a kilo of meat."</div><div><br></div><div>What you can do with these, and what you need to be done with these... It is mostly scope of some more dynamic environment, scripting comes to mind. To put them in compiled environment is just more of C++'s featurism (we can do it, why don't we...)... Your comparison to ML is right on spot. C++ is just mixed philosophy, mixed styles, mixed everything. Mixed results just follow suite.</div><div><br></div></body></html>