Design decision for DexDump.cpp being written in C

46 views
Skip to first unread message

Douglas Goddard

unread,
Apr 21, 2014, 2:57:13 PM4/21/14
to android-...@googlegroups.com
If this would be better suited for android-contrib, let me know and I'll redirect it there.

It looks to me that DexDump.cpp doesn't use much (if any) C++ specific sytax. 

Is there a reason behind this? 

Was the .cpp extension to conform to the rest of Android and make building easier?

If extending or modifying it, would adding in C++ be going against some best practice?

Thanks,
Doug

Glenn Kasten

unread,
Apr 22, 2014, 10:16:24 AM4/22/14
to android-...@googlegroups.com
git log dalvik/dexdump/DexDump.cpp 
especially commit bfc9799b1a53fd6f6136d07e6278d4538cf70f13
suggests that dexdump was originally written in C and then changed to C++.
The log also suggests that dexdump is maintained but stable,
and not under major new development.

dexdump is not in my technical area (audio), so I could be off-base here.
But I personally recommend not rewriting code
that's stable and working, unless something major new is needed. 
I've found that changing code that meets its
requirements is risky and not worth the benefit.

On the other hand, if you think dexdump does need major
new features, then that could perhaps be an excuse
to also make style changes.  In that case, I suggest
you first post your proposal to android-contrib, get some
positive consensus on android-contrib about your features and implementation
approach, and then being uploading a series of small CLs.
Reply all
Reply to author
Forward
0 new messages