News for hackers. Stuff that matters.
Re:Modern C++ Won't Save Us (2019) by tejohnso on Sunday April 25, 2021 @10:26PM (#26938640)
Wow, Casey doesn't hold back. Clearly, without hesitating says that 100% of code written in RAII* style sucks. Interesting considering Stroustrup considers RAII to be "the basis of some of the most effective modern C++ design techniques."

I'd like to hear Casey's comments on TDD.

*RAII style is lumped together with try/catch, smart pointers, tons of malloc/free new/delete

Re:Modern C++ Won't Save Us (2019) by asiachick on Monday April 26, 2021 @03:13AM (#26940087)
Casey hasn't a clue. He's only written games and he hasn't actually had to solve the issues that are being solved by in other domains. If he actually did have that experience he'd see his ideas don't scale. Games are in generally, vastly different than other apps (word processors, video editors, browsers, etc) in for one, for the most part, they get to choose all of their data upfront. If you're making "The Last of Us 2" there is no user data. There's no "some people will use this to write a letter to grandma and yet some other people will write an 800 page book on physics with mathematical diagrams" and yet another will write a report on the market with linked live data.
Re:Modern C++ Won't Save Us (2019) by flohofwoe on Monday April 26, 2021 @04:12AM (#26940398)
Consider "games" like Minecraft, Roblox or Dreams, those are entirely user-data-driven. Different types of games are at least as different to each other as to other types of applications (or rather, they are not less diverse than other applications, they usually just have a higher focus on performance).
Re:Modern C++ Won't Save Us (2019) by kaba0 on Monday April 26, 2021 @07:36AM (#26941437)
How are they different? You have some primitives like a block, and meaning is given by users to a group of them. The program has to care only about the primitives.

(Of course making it performant, not rendering/“simulating” everything and the like is exceedingly hard, but it is true that it is more of a “closed world” as opposed to some other areas of software development.)

Re:Modern C++ Won't Save Us (2019) by flohofwoe on Monday April 26, 2021 @09:13AM (#26942158)
This type of "creative games" lets users combine basic building blocks in the same way a word processor application allows to write entire books by combining a a limited set of characters. The limitations of strictly linear games like Last of Us are not because of technological restrictions but because it's hard to tell a cinematic story while still giving the user complete freedom.
Re:Modern C++ Won't Save Us (2019) by asiachick on Monday April 26, 2021 @10:29AM (#26942854)
I'm pretty confident Minecraft, Roblox, and Dreams are not following Casey's practices.
Re:Modern C++ Won't Save Us (2019) by tejohnso on Monday April 26, 2021 @10:42AM (#26942998)
What makes you say that?
Re:Modern C++ Won't Save Us (2019) by Johanx64 on Tuesday April 27, 2021 @07:12AM (#26954401)
Minecraft was created in Java with ducktape and hacks and a lot of ugliness and perf characteristics which wouldn't fly past a pedantic programmer like Casey
Re:Modern C++ Won't Save Us (2019) by brhsagain on Monday April 26, 2021 @04:14PM (#26947473)
Is your argument that arenas don't scale because user-provided data is variable in size?

Although arena memory is casually described as "allocate one huge chunk of memory up front," you are not literally only allocating one block ever and praying it never runs out. If you run out, you allocate another block. The point is that you don't call malloc for every string, object, list, etc. Adhering to this largely eliminates the need for RAII. What about this doesn't scale?

Personal anecdote: I'm building an IDE, where literally all of my data is provided by the user, and arenas have worked perfectly. I don't think I have a single destructor except for dealing with things like file descriptors, etc.

Re:Modern C++ Won't Save Us (2019) by HexDecOctBin on Sunday April 25, 2021 @10:37PM (#26938693)
I wonder, has Bjarne Stroustrup even shipped any industrial-grade software? Because he's mostly an academic AFAIK.
Re:Modern C++ Won't Save Us (2019) by ncmncm on Monday April 26, 2021 @12:33AM (#26939262)
Bjarne Stroustrup is a Director at Morgan-Stanley, a major investment bank in New York where software difficulties may cost millions of dollars per minute. He has described his workday as people coming to him with a difficult software engineering problem, about which he asks increasingly detailed questions until light dawns, and they go away ready to re-write the badly designed subsystem causing the trouble.
Re:Modern C++ Won't Save Us (2019) by indy on Monday April 26, 2021 @01:14AM (#26939429)
Often, just the act of explaining your problem to someone results in possible answers. (see Rubber Duck Debugging https://rubberduckdebugging.com)
Re:Modern C++ Won't Save Us (2019) by boomlinde on Monday April 26, 2021 @07:42AM (#26941469)
When using a "rubber duck" I think you just force yourself to turn loose thoughts into coherent ideas by having to express them clearly. This can reveal some problems that were not apparent before the idea was expressed. It's a "rubber duck" because it's really just a monologue and an inanimate object could do the job of the listener.

What's described above seems more like Socratic questioning, where a person asks questions that reveal facets of an idea that the person being asked may not have considered, thereby prompting the asked to rethink their assumptions and draw new conclusions.

Re:Modern C++ Won't Save Us (2019) by syspec on Monday April 26, 2021 @01:06AM (#26939391)
Everybody describes their own day like that
Re:Modern C++ Won't Save Us (2019) by PaulDavisThe1st on Sunday April 25, 2021 @10:42PM (#26938719)
I have no idea what "industrial grade software is", but I ship a cross-platform DAW written in C++, and RAII is tremendously awesome.
Re:Modern C++ Won't Save Us (2019) by HexDecOctBin on Sunday April 25, 2021 @10:57PM (#26938794)
Are you saying that it is better than the alternatives? Have you tried writing code from a grouped-resources perspective? What was your conclusion?
Re:Modern C++ Won't Save Us (2019) by PaulDavisThe1st on Monday April 26, 2021 @10:43AM (#26943009)
I don't see grouped resources as an alternative to the way we use RAII. It doesn't mean that the approach doesn't have its own merits, but it doesn't cover the things we do with RAII. The architecture of a DAW isn't much like a server that responds to requests, even if there are elements of it that do correspond to that pattern.

Alternatively, you are referring to something I'm not aware of.

Re:Modern C++ Won't Save Us (2019) by hardlianotion on Monday April 26, 2021 @10:15AM (#26942709)
Edit - Already answered in more detail, below.

He is at Morgan Stanley,

https://www.morganstanley.com/profiles/bjarne-stroustrup-man...

I don’t know how close he is to the grind, but I imagine he at least talks to people who are reasonably often.

Re:Modern C++ Won't Save Us (2019) by throwaway17_17 on Monday April 26, 2021 @02:18AM (#26939787)
Does TDD here mean ‘Type Driven Development’ a la Idris or, as I assume (and seems more likely) does it mean Test Driven Development?

If you mean test driven, I don’t think I have heard Casie discuss anything remotely close to the standard presentation of TDD strategies. I would imagine, based on watching a large amount of Casie streaming, both alone and with Blow, that he would view testing (as in TDD) as unproductive for his particular style of development and his goals as a programmer. But, since it’s in my brain now I will ask him next time I catch a live stream just to satisfy my curiosity.

I can’t speak to any discussions specifically about TypeDD. But would bet Casie would be wholly uninterested and consider it theoretical academic fluff that pulls away from the fundamental data transformation work of development.