什么时候适合用C面向对象的语言吗? [英] When is it appropriate to use C as object oriented language?

查看:110
本文介绍了什么时候适合用C面向对象的语言吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有很多优秀的答案,一个人如何可以模拟与C的面向对象的概念名字的几个:

There are a lot of excellent answers how can one simulate object oriented concepts with C. To name a few:

  • C double linked list with abstract data type
  • C as an object oriented language
  • Can you write object oriented code in C?

的是它适合使用这种模拟,而不是使用支持面向对象技术本身的语言吗?

When is it appropriate to use such simulation and not to use languages that support object-oriented techniques natively?

高度相关的:

  • Why artificially limit your code to C?
  • What's the advantage of using C over C++ or is there one?

推荐答案

我给你的一个原因,我知道的,因为它一直是这样对我来说:

I'll give you the one reason I know of because it has been the case for me:

当你正在开发软件,一个独特的平台,唯一可用的编译器是一个C编译器即可。这种情况往往在嵌入式微控制器的世界。

When you are developing software for a unique platform, and the only available compiler is a C compiler. This happens quite often in the world of embedded microcontrollers.

这篇关于什么时候适合用C面向对象的语言吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆