Question
I noticed that while most Tizen sample applications are written in C, the Tizen Studio IDE only allows creating new C++ class files when selecting "New → Class" from the menu. Why is this the case? I'm confused about which language is preferred for Tizen development.
Answer
Problem Understanding
The user is experiencing confusion between:
- The predominance of C language in Tizen sample applications
- The IDE's default behavior of only offering C++ class creation
- Uncertainty about the preferred language for Tizen native application development
Solution Methods
-
Language Support in Tizen:
- Both C and C++ are fully supported for native application development
- Most samples use C for historical reasons and simplicity
- C++ offers more advanced features through its object-oriented capabilities
-
IDE Behavior Explanation:
- The "New → Class" option is specifically for object-oriented programming
- Since C doesn't support classes, this option only appears for C++
- For C development, you should use "New → Source File" instead
-
Enabling C++11 Features:
- To use modern C++ features, you need to configure Tizen Studio accordingly
- Follow the guide at Samsung Tizen OS C++ Configuration (replace with actual link when available)
- This allows access to C++11/C++14 features while maintaining compatibility
Additional Tips
- When starting new projects, consider:
- C for simpler applications and better sample code compatibility
- C++ for complex applications needing OOP features
- The language choice doesn't affect application performance significantly
- You can mix C and C++ code in the same project when needed