# Rewriting Playdar from C++ to Erlang: source-code savings and similar resource use

DevFeed: [Rewriting Playdar from C++ to Erlang: source-code savings and similar resource use](<https://devfeed.tech/articles/rewriting-playdar-c-to-erlang-massive-savings-25822.md>)

Original publisher: [Read original article](<https://www.metabrew.com/article/rewriting-playdar-c-to-erlang-massive-savings>)

Author: {"image"=\>"rj-headshot.jpg", "greetings"=\>nil}

Published: 2009-10-21T05:00:00Z

Content type: opinion

Language: en

Sources: [Richard Jones](<https://devfeed.tech/sources/richard-jones.md>)

Topics: [Erlang](<https://devfeed.tech/topics/erlang.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Code](<https://devfeed.tech/topics/code.md>), [cross-platform](<https://devfeed.tech/topics/cross-platform.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [code](<https://devfeed.tech/tags/code.md>), [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [playdar](<https://devfeed.tech/tags/playdar.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rewrite](<https://devfeed.tech/tags/rewrite.md>)

## AI overview

The author describes rewriting Playdar from C++ to Erlang after initially developing it with Boost, Asio, and CMake. The Erlang version reached near feature parity within a week, and counting bundled third-party code while excluding Boost and Asio showed a 92% reduction in source lines. Preliminary comparisons found similar CPU and memory usage overall, with Erlang using slightly more memory at the time of writing.

## Source excerpt

I've heard many anecdotes and claims about how many lines of code are saved when you write in Erlang instead of [C++/other language]. I'm happy to report that I now have first-hand experience and some data to share.