Stunt is C++

Showing 1-4 of 4 messages
Stunt is C++ Todd Sundsted 6/20/13 6:01 AM
My feeling is that if you find yourself building exception handling in
C, you need to just start using C++.

With that in mind, I have fixed the issues with the Stunt/LambdaMOO
codebase that prevented compilation with a C++ compiler, and I am now
ripping out exceptions.[ch] and replacing its few uses with C++
exceptions.  The rest of the code is still "C" and would probably
mostly compile with a C compiler, too, but that will change.

I don't want the credit for the port.  The prototype was definitely
Steve Wainstead's Waverous and his merge of Waverous and Stunt from a
year ago.  That was good work!

So, why?

A few reasons:

1) Maintaining the LambdaMOO codebase really highlighted how little
type support you get from a C compiler.  If you're going to use a
language with static typing you might as well use one with as much
type support as you can get.  (I would have liked to use Rust.)

2) C++ has a killer ecosystem of libraries.  They're better designed,
more modern, well maintained...  I estimate that Boost alone would
have cut the codebase in half had it been available when LambdaMOO was
written.

3) RAII (http://en.wikipedia.org/wiki/
Resource_Acquisition_Is_Initialization).

Anyway, thanks to Steve!  The code is on github.  More to come.

Todd
Re: [MOO-talk] Stunt is C++ Steve Wainstead 6/20/13 10:25 AM
As programmers one of the most gratifying things we get is to see our
code go live. Thanks, Todd, for your enormous efforts and I've been
very happy to contribute!

I see in my future more contributions, as I still want to do more
modernization of the autotools stuff (automake being the primary
thing).
> --
> You received this message because you are subscribed to the Google Groups "MOO Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to MOO-talk+u...@googlegroups.com.
> To post to this group, send email to MOO-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/MOO-talk.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--

              http://google.com/search?q=wainstead
              http://www.meetup.com/Las-Vegas-Developers/
Re: [MOO-talk] Stunt is C++ Loufah 6/21/13 7:17 AM
Great work, guys. Hope that, at some point, you can write something more detailed about how the code evolves and improves by moving to C++ and Boost.

> I estimate that Boost alone would have cut the codebase in half had it
> been available when LambdaMOO was written.

Had LambdaMoo used Boost on 1991 hardware, the compilation would still be running. :)

Re: [MOO-talk] Stunt is C++ Todd Sundsted 6/21/13 10:37 AM
And the executable would be about 20x larger :-(

The main benefit right now is developer productivity.  C's a fine language, but I spend far too much time dealing with its limitations.  I realize that my idea of its limitations is another's idea of its strengths, but I want classes, strong compiler enforced types, templates (in moderation)...

I could probably achieve all if the functional enhancements without any of that, but why...?

Specifics include integrating a few things like RE2, encapsulating more of the global state, and reducing the footprint of explicit memory management.

Todd