Hacker News new | past | comments | ask | show | jobs | submit login

I'm doing OOP in C right now in my work. I'm porting a C++ program to a new platform and, for reasons, the most feasible language to use for it is C.

Re-engineering the code to be not object oriented is not practical, so we're keeping its OO nature.




What's the point of refactoring C++ to C? That sounds weird and regressive.


No C++ compiler for the target architecture?


For subtle technical reasons relating to the toolchain, it's not possible to use C++ for this platform.

Well, it is possible, but it would easily take four times the amount of time it would take to port the C++ code to C. So porting makes the most sense.


There are a few niche reasons. The entire GNOME/GTk stack benefits greatly in the realm of language interop from being C at its core. This is why it easily has bindings to every language ever.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: