3D Realms Forums

3D Realms Forums (https://forums.3drealms.com/vb/index.php)
-   Programming Forum (https://forums.3drealms.com/vb/forumdisplay.php?f=24)
-   -   John Carmack on Functional Programming in C++ (https://forums.3drealms.com/vb/showthread.php?t=38710)

8IronBob 05-01-2012 04:38 PM

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

MrBlackCat 05-02-2012 07:49 AM

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

8IronBob 05-02-2012 01:41 PM

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.

MrBlackCat 05-03-2012 03:19 PM

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

Commando Nukem 05-23-2012 01:00 PM

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. :)

MrBlackCat 05-23-2012 02:32 PM

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

pjVgt 08-14-2012 03:17 PM

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.

KO Gilligan 08-20-2012 06:24 AM

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.

8IronBob 08-20-2012 08:23 AM

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.

pjVgt 08-27-2012 09:45 AM

Re: John Carmack on Functional Programming in C++
 
Quote:

Originally Posted by KO Gilligan (Post 959174)
* 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 (Post 959178)
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.

Dopefish7590 08-27-2012 07:37 PM

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)

ryche 09-04-2012 12:12 AM

Re: John Carmack on Functional Programming in C++
 
Quote:

Originally Posted by pjVgt (Post 959252)
I mean dude has balls but this is full-retard mode

http://www.jennhoffman.com/blog/wp-c...ull-Retard.jpg

:)


All times are GMT -6. The time now is 06:48 AM.

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.