maradydd: (Default)
maradydd ([personal profile] maradydd) wrote2009-05-14 04:50 am
Entry tags:

(no subject)

I love const_cast and it loves me back. (It's hard to go wrong adding const to things as long as you're confident that it's okay for them to be immutable. These totally are.)

[identity profile] marapfhile.livejournal.com 2009-05-14 12:26 pm (UTC)(link)
i wrote an immutable-programming-based tetris a couple days ago, partly out of boredom and partly as an exercise. (all functions take a piece and/or a board, apply some change, and return the new piece and/or board.) it's an interesting style to work in after a decade or so of unmitigated imperative coding.

[identity profile] maradydd.livejournal.com 2009-05-14 03:50 pm (UTC)(link)
I'm a big fan of writing in as functional a style as possible even when I'm writing in a procedural language. Fewer side effects and a well-defined sense of scope make debugging a lot easier.