Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 09-13-2005, 01:39 PM   #1 (permalink)
erh88
Registered User
 
Join Date: Sep 2005
Posts: 2
erh88 is on a distinguished road
C++ Template Metaprogramming

Perhaps I am missing something, but what do C++ templates and metaprogramming offer that object-oriented methods such as inheritance do not?
erh88 is offline   Reply With Quote
Old 09-13-2005, 03:39 PM   #2 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
A higher level of abstraction.
__________________
Valmont is offline   Reply With Quote
Old 09-13-2005, 04:40 PM   #3 (permalink)
erh88
Registered User
 
Join Date: Sep 2005
Posts: 2
erh88 is on a distinguished road
What can be achieved with metaprogramming that can't be achieved with an object-oriented framework with a good level of abstraction? Is it more efficient or is there some type of optimization?
erh88 is offline   Reply With Quote
Old 09-13-2005, 08:20 PM   #4 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Try to make a generic array sorting algorithm the object oriented way without templates and with templates. Then observe the difference. Templates offer a neat way of generalization. For every problem there may be some sort of a solution but the question is how will the code or the design look.
__________________
Valmont is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some questions about C fp_unit Standard C, C++ 3 08-14-2005 07:22 PM
Kaat a talking bot in c nvictor Platform/API C++ 10 05-19-2005 02:16 PM
operate overloading member function in C# sureshkumar_kc MS Technologies ( ASP, VB, C#, .NET ) 2 10-15-2004 03:36 AM
edit? anon Lounge 10 11-21-2002 04:02 PM


All times are GMT -8. The time now is 05:03 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting