C++ 入门(Python 的范式转变)

发布于 2024-08-27 13:42:33 字数 235 浏览 8 评论 0原文

我想学习 C++,以便可以为服务器相关的东西开发 C++ Python 模块。

我是一名纯粹的动态语言开发人员(Python、PHP、Ruby 等)。我想学习一门快速的语言,如果我要这样做,我宁愿学习一门非常快的语言,比如 C++。在我开始之前,我就明白突然使用静态类型、不同的语法和编译代码将是一个相当大的范式转变。 具有动态语言经验的 C++ 开发人员是否可以给我任何建议,以帮助我更快地进行这种转变?

I want to learn C++ so that i can develop C++ Python modules for server-related stuff.

I'm a purely dynamic languages developer (Python, PHP, Ruby, etc). I want to learn a fast language, and if I'm going to do this, I'd rather learn a really fast language like C++. Before I even get started though, I understand that suddenly working with static types, a different syntax, and compiling code will be quite the paradigm shift. Is there any advice that a C++ dev who also has dynamic languages experience can give me to me to help me make that shift faster?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

水波映月 2024-09-03 13:42:33

我怀疑是否有任何具体的建议可以提供,除了您必须阅读一本由权威作者撰写的关于 C++ 的好书 - 不要选择您遇到的第一本或最便宜的书。有关书籍列表,请参阅权威 C++ 书籍指南和列表 -我个人强烈推荐 Accelerated C++ - 它是为有编程经验的人编写的,但不是专门为那些即将到来的人编写的来自动态语言背景。

I doubt there is any specific advice that can be given, other than that you must read a good book on C++ written by an authoritative author or authors - do not pick the first or cheapest one that comes your way. For a list of books see The Definitive C++ Book Guide and List - I personally would strongly recommend Accelerated C++ - it is written for people with programming experience, though not specifically for those coming from a dynamic language background.

且行且努力 2024-09-03 13:42:33

获取书籍和工具(g++ 或 VC++)

在从 python 到 C++ 的过渡中,我建议

  • 学习鸭子类型和静态类型之间的差异,
  • 了解与 c++ 内存管理相关的 Python 内存管理之间的差异。

当你知道这一点时,你就能够写出一些东西而不会搬起石头砸自己的脚。

由于 C++ 的多范式性质,还有许多其他不同的主题,但请从基础知识开始,并根据需要添加到您的曲目中。

Get the the books, and the tools (g++ or VC++)

In the transition from python to C++ I would recommend

  • learn the differences between duck typing and static types
  • learn the differences between the memory management of Python related to the memory management of c++.

When you know this good, you'll be able to write something without shooting yourself in the foot.

There are plenty of other different topics also, because of the multi paradigm nature of c++, but start with the basics and add to your repertoire as you need it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文