Forum Archive

Go Back   3D Realms Forums > General Topics > Programming Forum
Blogs FAQ Community Calendar

Notices

 
 
Thread Tools
Old 05-01-2012, 04:38 PM   #1
8IronBob

8IronBob's Avatar
John Carmack on Functional Programming in C++
This looked like an interesting read. For those of you who are big in C++ game development, or any C++ development in general, it seems like Carmack let the dog loose with his thoughts on it, and it should be quite inspiring:

Quote:
Originally Posted by Gamasutra - News - In-depth: Functional programming in C++
Probably everyone reading this has heard "functional programming" put forth as something that is supposed to bring benefits to software development, or even heard it touted as a silver bullet. However, a trip to Wikipedia for some more information can be initially off-putting, with early references to lambda calculus and formal systems. It isn't immediately clear what that has to do with writing better software.

My pragmatic summary: A large fraction of the flaws in software development are due to programmers not fully understanding all the possible states their code may execute in. In a multithreaded environment, the lack of understanding and the resulting problems are greatly amplified, almost to the point of panic if you are paying attention. Programming in a functional style makes the state presented to your code explicit, which makes it much easier to reason about, and, in a completely pure system, makes thread race conditions impossible.

I do believe that there is real value in pursuing functional programming, but it would be irresponsible to exhort everyone to abandon their C++ compilers and start coding in Lisp, Haskell, or, to be blunt, any other fringe language.
Link: http://gamasutra.com/view/news/16929...mming_in_C.php
__________________
PC Specs (a.k.a. "Galacticus Prime"): http://pcpartpicker.com/p/7Vk7FT
8IronBob is offline  
Old 05-02-2012, 07:49 AM   #2
MrBlackCat

MrBlackCat's Avatar
Re: John Carmack on Functional Programming in C++
Hehehe... Yeah.
Conceptually I think about how office staff always used to praise new version of Word Processors SpreadSheets and Operating system versions with "amazing new things" they could do... and I would point out how the same features were present beginning on the Spreadsheets and Word Processors of my Commodore 64, a decade before... and were also present in the previous version of the software they had been using, for years.
The end result was, of course, just to "kill the messenger", so to speak.

MrBlackCat
__________________
YES! I do wear my Duke Xtreme t-shirt every day!* :)

*(Not really, sometimes I wear my Time to Kill t-shirt... like while I am washing my other Duke shirts for instance.)
:)
MrBlackCat is offline  
Old 05-02-2012, 01:41 PM   #3
8IronBob

8IronBob's Avatar
Re: John Carmack on Functional Programming in C++
Well, considering that Carmack's been developing games since the C++ language first introduced, supposedly, I can totally understand his take on what he feels about the most efficient way to learn programming, and how to best go about making code that works, and works well. So I'll definitely take his word on what he writes in the article.
__________________
PC Specs (a.k.a. "Galacticus Prime"): http://pcpartpicker.com/p/7Vk7FT
Last edited by 8IronBob; 05-02-2012 at 01:44 PM.
8IronBob is offline  
Old 05-03-2012, 03:19 PM   #4
MrBlackCat

MrBlackCat's Avatar
Re: John Carmack on Functional Programming in C++
Remember QuakeC. LOL!
I remember learning about how it worked and thinking what a super-genius Carmack was.

It worked well for Quake, but I just read it was not used in any other id engines after that.

MrBlackCat
__________________
YES! I do wear my Duke Xtreme t-shirt every day!* :)

*(Not really, sometimes I wear my Time to Kill t-shirt... like while I am washing my other Duke shirts for instance.)
:)
MrBlackCat is offline  
Old 05-23-2012, 01:00 PM   #5
Commando Nukem

Commando Nukem's Avatar
Re: John Carmack on Functional Programming in C++
QuakeC is still a very beautifully written bunch of code. Right up there with Con Code in terms of the potential of functionality you can squeeze out of it.
__________________
Open Maw Productions
Commando Nukem is offline  
Old 05-23-2012, 02:32 PM   #6
MrBlackCat

MrBlackCat's Avatar
Re: John Carmack on Functional Programming in C++
I can't say for myself, but observation of what individuals have done with it over the years shows what an amazing system it is.

MrBlackCat
__________________
YES! I do wear my Duke Xtreme t-shirt every day!* :)

*(Not really, sometimes I wear my Time to Kill t-shirt... like while I am washing my other Duke shirts for instance.)
:)
MrBlackCat is offline  
Old 08-14-2012, 03:17 PM   #7
pjVgt

pjVgt's Avatar
Re: John Carmack on Functional Programming in C++
I hate John Carmack.

Seriously I have nothing against the guy on personal level but I hate everything he stands for. I hate him because everything he says is usually true - in the robotic, non-humane sense of way. He is like a machine without a soul not like a human being - efficent and logic.
__________________
"Imma want my dukemz to pley!!!" - chaosomega
pjVgt is offline  
Old 08-20-2012, 06:24 AM   #8
KO Gilligan

KO Gilligan's Avatar
Re: John Carmack on Functional Programming in C++
* efficient and logical

and that's a funny rant. I wonder if John secretly looks at us like a bunch of instinct-driven primates, stumbling around and practicing trial and error on everything.
KO Gilligan is offline  
Old 08-20-2012, 08:23 AM   #9
8IronBob

8IronBob's Avatar
Re: John Carmack on Functional Programming in C++
I guess there's a reason why he's been into this business for almost a quarter-century.
__________________
PC Specs (a.k.a. "Galacticus Prime"): http://pcpartpicker.com/p/7Vk7FT
8IronBob is offline  
Old 08-27-2012, 09:45 AM   #10
pjVgt

pjVgt's Avatar
Re: John Carmack on Functional Programming in C++
Quote:
Originally Posted by KO Gilligan View Post
* efficient and logical

and that's a funny rant. I wonder if John secretly looks at us like a bunch of instinct-driven primates, stumbling around and practicing trial and error on everything.
From the Masters of Doom book (which I recommend to read) it seems like that - but we like to simplify things and for the readers this may be just easier to characterise Carmack as a soulless robot-overlord. There is very little information about his personal life and I suppose he is very protective over it. This sort of persona - Engine John, the ultimate technocrate may be just created by him for his advantage.

Quote:
Originally Posted by 8IronBob View Post
I guess there's a reason why he's been into this business for almost a quarter-century.
Actually there is very little reason why he is in the video game business still. He is far better doing in the rocket industry - and there is still some work to do for commercial payload solution other than hunderds of people brute-force copy/paste textures for another COD clone like in video games.

And regarding the video game business - Carmack policy is just DISASTROUS. This is why they have Todd as a CEO not Carmack. John does almost everything no other guy in the business does (other than suicidees or crazy people) - he releases the source code, he supports mod tools, he criticizes his own products and engines he intentds to license, he bashes consoles for their limitations and lack of power, he clearly states PC as a platform is superior to others. I mean dude has balls but this is full-retard mode for any business practice.
__________________
"Imma want my dukemz to pley!!!" - chaosomega
pjVgt is offline  
Old 08-27-2012, 07:37 PM   #11
Dopefish7590

Dopefish7590's Avatar
Re: John Carmack on Functional Programming in C++
I've taken quite a liking to the functional paradigm... It has a lot more advantages than a lot of people give it credit for. First class and anonymous functions, closures, the whole deal.

I never really appreciated it until I tried learning Common LISP... Maybe I'll pick up Clojure soon since I can use it for much more practical application than Common LISP at the moment. (Because JVM is more ubiquitous, and exporting executable LISP images produces rather cumbersome files)
Last edited by Dopefish7590; 08-27-2012 at 07:39 PM.
Dopefish7590 is offline  
Old 09-04-2012, 12:12 AM   #12
ryche

ryche's Avatar
Re: John Carmack on Functional Programming in C++
Quote:
Originally Posted by pjVgt View Post
I mean dude has balls but this is full-retard mode


__________________
{<- machines have no conscience ->}
{<- “Shoot him!” They say, Who will be the killer? Who will be the winner? ->}
ryche is offline  
 

Bookmarks


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

Forum Jump


All times are GMT -6. The time now is 05:34 AM.

Page generated in 0.16059589 seconds (100.00% PHP - 0% MySQL) with 17 queries

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

Website is ©1987-2014 Apogee Software, Ltd.
Ideas and messages posted here become property of Apogee Software Ltd.