Search found 3948 matches

by chili
April 16th, 2020, 8:25 am
Forum: Everything
Topic: RAII and exceptions
Replies: 3
Views: 2224

Re: RAII and exceptions

It's more common in general utilities for sure. A good example of this stuff can be found in the C++ Concurrency book.
by chili
April 16th, 2020, 8:06 am
Forum: Everything
Topic: C++ port of Doom from C
Replies: 11
Views: 6339

Re: C++ port of Doom from C

I'm no expert on the subject, having not coded in Rust myself. But I take it there are advantages in the borrow system, improvements on stuff like lifetime of temporaries maybe?

https://doc.rust-lang.org/1.8.0/book/re ... owing.html
by chili
April 15th, 2020, 10:22 am
Forum: Everything
Topic: Test
Replies: 15
Views: 15132

Re: Test

Thanks bruh. If/when I get some time I'll look into it. They don't have versions that exactly match what I'm running here, so I might need to upgrade the forum version, which may or may not be an involved process.
by chili
April 15th, 2020, 10:09 am
Forum: Everything
Topic: Intermediate 4 Homework Help
Replies: 10
Views: 4087

Re: Intermediate 4 Homework Help

ba dum tiss
by chili
April 15th, 2020, 10:06 am
Forum: Everything
Topic: C++ port of Doom from C
Replies: 11
Views: 6339

Re: C++ port of Doom from C

The package system seems great, and it has some first-class support for resource ownership semantics that C++ is lacking.
by chili
April 15th, 2020, 10:04 am
Forum: Everything
Topic: RAII and exceptions
Replies: 3
Views: 2224

Re: RAII and exceptions

Yeah, I like to use RAII to manage setup/cleanup pairs. You could just put a bunch of calls in the ctor(s) / dtor of your main class (app or whatever), but it's just cleaner and more organized to put that in a separate class and then embed in app. Exceptions go hand in hand with this whole setup. On...
by chili
April 13th, 2020, 11:37 am
Forum: Everything
Topic: IS_DEBUG
Replies: 5
Views: 2657

Re: IS_DEBUG

It should be defined in both release and debug as a boolean=true or =false. AS slidy says, you do this in the properties for both configurations.
by chili
April 11th, 2020, 3:15 pm
Forum: Everything
Topic: C++ port of Doom from C
Replies: 11
Views: 6339

Re: C++ port of Doom from C

I've seen that in my subscription feed over the past weeks. I'm not a fan of 'pure C' as it tends to be practiced. I can see how some people might not be down for learning curve the C++ presents. Those people should probably look at Rust.
by chili
April 3rd, 2020, 2:04 am
Forum: Everything
Topic: overloading an operator, why?
Replies: 2
Views: 1663

Re: overloading an operator, why?

What, you mean you don't prefer this?

Code: Select all

add( multiply( a,b ),divide( c,subtract( d,e ) ) )
by chili
March 22nd, 2020, 2:38 pm
Forum: Everything
Topic: Auto cast an iterator into its base pointer type ?
Replies: 25
Views: 10600

Re: Auto cast an iterator into its base pointer type ?

I feel like education in universities etc. have really failed in teaching OOP. They show you what a class is, what inheritance is, etc. etc., but there is far too little time spent on the why. So many people just end up creating classes because "that's what you do", without ever really knowing why t...