4 ms·
This is from 2011, maybe around the peak of functional hype, when even John Carmack sent out memos about approaching things in FP ways, and tried making his thi
by jstimpfle 4y ago
This is from 2011, maybe around the peak of functional hype, when even John Carmack sent out memos about approaching things in FP ways, and tried making his things in Haskell and then Scheme. It's my impression (which could be wrong) that he has significantly backpedaled from that since then.
- the_af 4y agoThe recent interview with Lex Fridman seems to indicate Carmack hasn't backpedaled at all.
- jstimpfle 4y agoCan you share a timestamp? I'm not aware of any new stories from his Scheme and Haskell adventures. In the first section of the interview he specifically points out the merits of C and C-style C++, and explains how Lisp (especially mountains of macros) are hard to maintain in a team.
- the_af 4y agoScheme and Haskell are not the central point. Carmack mentions he still appreciates FP lessons when writing C code.
- jstimpfle 4y agoHe does. Not that anyone cares, but I do as well. But considering FP lessons while still writing C is a long way from considering how far Java can be moved towards Haskell. Or experimenting with writing large parts of games and systems software in Scheme.
- the_af 4y agoWell, the link between whatever Carmack thought about FP and C, and Java and FP idioms, was tenuous to begin with. Yet you introduced it in your comment... To give my perspective: Carmack was a latecomer in this, at least for the widespread programming paradigms community, and also remember game programming is a niche (so what worked there was unlikely to permeate to the general community [1]). So whatever Carmack thought (which I appreciate, since I hold him in high regard!) is unlikely to have had any sway in Java, Kotlin, Scala, and other proglangs adopting FP idioms. I distinctly remember back in that era, few people who were not gamers even knew who Carmack was (to my chagrin!). [1] I remember an experience from my distant past, when interviewing at Vostu (a Zynga-like online game company), the chief engineer told me "we don't use frameworks here, just plain Java. Forget Spring, forget Hibernate, forget everything. We don't use them. Everything we do, we do by hand". (I didn't take the job offer for unrelated reasons). Note this is highly unrepresentative of the Java community at large!
- bigDinosaur 4y agoWhat do you mean exactly by 'backpedal'? As far as I know Carmack has stated that FP in general is achievable for games, he sees the benefit, but the languages and tooling just aren't there yet. There's probably some more research that needs to be done into the ideal mix of imperative and functional features in a language, too, that's something I think is very much not settled. I believe his comments about Haskell specifically deemed it ultimately unsuitable, although not necessarily because of the paradigm. At least that's what I remember him writing and talking about ~8 years ago.
- PaulHoule 4y agoI'd say generally you lose a factor of two in performance when you use immutable persistent collections. Performance isn't everything (otherwise Python wouldn't be so popular) but when people have a system that works the last thing they want to hear is about a way to slow it down.
- the_af 4y ago> I'd say generally you lose a factor of two in performance when you use immutable persistent collections. Is there a reference for this?
- waffletower 4y agoHow is a celebrity game/AR developer's opinion relevant to a discussion of API design in Java?