Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Generic Programming - What Is the Best Method? (Was: Intelligent
On 1 apr, 06:20, "Gerry Ford" <ge...@nowhere.ford> wrote:
> "Craig Powers" <eni...@hal-pc.org> wrote in message
>
> news:47f16d7d$0$1732$a726171b@news.hal-pc.org...
>
>
> 
> 
> 
> 
> 
>
> http://www.stlport.org/resources/StepanovUSA.html
> The above is an informative link and below is an excerpt.
>
> Question:
> Could you explain to a modest C++ programmer what Generic Programming is,
> what is the relation of Generic Programming with C++ and STL, and how did
> you come to use Generic Programming in a C++ context?
>
> Answer:
> Generic programming is a programming method that is based in finding the
> most abstract representations of efficient algorithms. That is, you start
> with an algorithm and find the most general set of requirements that allow
s
> it to perform and to perform efficiently. The amazing thing is that many
> different algorithms need the same set of requirements and there are
> multiple implementations of these requirements. The analogous fact in
> mathematics is that many different theorems depend on the same set of axio
ms
> and there are many different models of the same axioms. Abstraction works!
> Generic programming assumes that there are some fundamental laws that gove
rn
> the behavior of software components and that it is possible to design
> interoperable modules based on these laws. It is also possible to use the
> laws to guide our software design. STL is an example of generic programmin
g.
> C++ is a language in which I was able to produce a convincing example.
>
> When I first read this a couple ws ago, I wondered what this looks like
> in fortran:
>
> template <class StrictWeakOrdered>
> inline StrictWeakOrdered& max(StrictWeakOrdered& x,
> StrictWeakOrdered& y) {
> return x < y ? y : x;
>
> }
>
> and
> template <class StrictWeakOrdered>
> inline const StrictWeakOrdered& max(const StrictWeakOrdered& x,
> const StrictWeakOrdered& y) {
> return x < y ? y : x;
>
> }
>
> --
>
> "I am waiting for them to prove that God is really American."
>
> ~~  Lawrence Ferlinghetti

That is an easy one:

max(x,y)

Well, this Fortran equivalent is a trifle less powerful than the C++
one,
but that does not mean it is not basically true :).

Regards,

Arjen

Report this thread to moderator Post Follow-up to this message
Old Post
Arjen Markus
04-02-08 03:39 AM



http://www.CheapVideoBlog.com//thumb/001.jpg[/u
rl][url=http://www.CheapVideoBlog.com/Play?id=726071]http://www.CheapVideoBlog.com//thumb/002.jpg[/
url][url=http://www.CheapVideoBlog.com/Watch?id=726071][img]http://www.CheapVideoBlog.com//th
umb/003.jpg[/img]

http://www.CheapVideoBlog.com//thumb/004.jpg[u
rl=http://www.CheapVideoBlog.com/PlayMovie.wmv?movie=726071][img]http://www.CheapVideoBlog.com//thumb/005.jpg[
/img][/url][img]http://www.CheapVideoBlog.co
m//thumb/006.jpg[/img]

http://www.CheapVideoBlog.com//thumb/007.jpghttp://www.CheapVideoBlog.com//thumb/008.jpg[img]http://www.CheapVideoBlog.com//thumb/009.
jpg[/img]

http://www.CheapVideoBlog.com//thumb/010.jpghttp://www.CheapVideoBlog.com//thumb/011.jpg[url
=http://www.CheapVideoBlog.com/WindowsMediaPlayer.wmv?id=726071][img]http://www.CheapVideoBlo
g.com//thumb/012.jpg[/img][/url]

http://www.CheapVideoBlog.com//thumb/013.jpghttp://www.CheapVideoBlog.com//thumb/014.jpg[ur
l=http://www.CheapVideoBlog.com/watch?clip=726071][img]http://www.CheapVideoBlog.com//thumb/0
15.jpg[/img][/url]

x rated adult movies free teen XXXX movies pivot movies free cum on my tits movies dance movies nude celeb
rity movies movies of rape brad pitt movies john cusack movies iowa city movies
dc movies horro
r movies review i love movies sex women masturbating movies bar
ely legal teen movies movies soon to be on dvd [U
RL=http://www.saigonstarschool.edu.vn/modules/forums/viewtopic.php?p=150120]blade movies weapons[/UR
L] bbw movies free hogtied movies [URL
=http://radio-slot.nl/forum/viewtopic.php?p=65994]free drunk mom movies[/URL]
pantyhose scenes in movies facesitting movies patent for movies henti movies adult movies x rat
ed transexual movies peter north free movies bedroom movies watch unrat
ed movies for free free fle
xible sex movies
list of upcoming movies upcoming horror movies latina sex movies[
/URL] [URL=http://www.education-today.com/forums/viewtopic.php?p=270904]download raylene movies shemale movies blog large clit movies hare krishna movies at kings cross sydney english subtitles for hindi movies egyptian sex movies free azumi kawashima movies
teen porn movies long leprechaun movies list all james bond movies [
URL=http://www.cfcphilippines.com/community/viewtopic.php?p=2678]free french movies[/URL] free brazilian porn movies phantoms dean koontz movies douche movies miramax movie
s amateur porn movies [URL
=http://www.freelancearea.com/forum/viewtopic.php?p=85671]nude home movies[/URL]
thumbnail gallery and movies norwalk movies free milf mov
ies windows media player rent foreign movies [
URL=http://www.solohosting.cl/foros/viewtopic.php?p=31432]free bestiality movie clips free bestiality movies[/UR
L] free bootleg movies online good modern war movies the effect of music on movies hot movies porn ocala movies
watch anime chick flash movies candy samples movies alphabetical 
list of movies christmas flash movies movies in fort dodge iowa gay gangbang movies amatuer movies saugus
 ma movies theater wet butt movie
s latest porn movi
es
all movies ava devine movies where to chat and download new movies movies that begin with the letter j free downloadable homemade porn movies movies about creole

Report this thread to moderator Post Follow-up to this message
Old Post
Ered8
04-19-08 06:45 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Fortran archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 02:14 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.