为什么我们需要从网上下载程序来编程?
Why do we need to download programs from the internet to program?
几年来,我尝试过用不同的语言做不同的事情,在我所做的每一件事中,你都需要下载大量不同的软件,才能开始编程。例如库、编译器、插件等。是否可以打开记事本,为 C++ 编写编译器,然后从那里开始工作?还是绝对需要下载软件?
你不需要(原则上)下载程序来学习编程。我在 1974 年开始编写代码,当时还没有互联网可用。
您通过编写 source code in some programming language. Your source code needs to be handled by some program, which is either a compiler or an interpreter. And you need something to give you the ability of typing source code (an operating system with a file system、源代码编辑器、文件管理器......来编程。
该编译器或解释器应该存在于您的计算机上(并且您在实践中还需要一些 operating system)。
您可以购买一台带有操作系统、编译器(或其中许多)的计算机 and/or 上面安装了一个解释器(您的供应商可能会进行下载和安装,您需要付钱给他为那项工作)。例如,许多 Linux distributions 拥有所有这些(我建议使用 Linux 来学习编程,这对学生和开发人员都非常友好)。
出于商业原因,Windows 没有安装所有这些。
在实践中,您需要许多其他程序来舒适地编写代码(source code editors, version control systems, command line interpreters, linkers, debuggers, build automation 工具,各种软件实用程序)。
you need to download a multitude of different softwares that enable you to begin programming.
一些编程环境更友好;例如DrRacket 大概是把几个工具打包在一起了。
如果您使用 C++ 编写代码,请不要混淆您将编译的 IDE you are using with your C++ compiler. Your IDE is likely to run a compiler (e.g. GCC) for you behind your back, and you'll better be able to run your C++ compiler on the command line. You generally want to enable all warnings and debug info, so with GCC 与 g++ -Wall -Wextra -g
。
Is it possible to open up notepad,
更好地学习使用好的、真实的、source code editor such as GNU emacs (it is free software). If coding in C++, you want syntax highlighting, automatic indentation and prettyprinting, autocompletion, brace matching 等....您将配置您的编辑器以满足您的需要。
program a compiler for c++
错误的术语。您不需要 编写 编译器,您只是 使用 现有的 C++ 编译器。实际上,C 和 C++ 编译器是 very complex pieces of software (because they are optimizing compilers), of many millions lines of source code. Both GCC and Clang/LLVM are free software C++ compilers (coded in C++ so bootstrapped);你可以下载他们的源代码并研究和改进它(为此你需要多年的工作)。
几年来,我尝试过用不同的语言做不同的事情,在我所做的每一件事中,你都需要下载大量不同的软件,才能开始编程。例如库、编译器、插件等。是否可以打开记事本,为 C++ 编写编译器,然后从那里开始工作?还是绝对需要下载软件?
你不需要(原则上)下载程序来学习编程。我在 1974 年开始编写代码,当时还没有互联网可用。
您通过编写 source code in some programming language. Your source code needs to be handled by some program, which is either a compiler or an interpreter. And you need something to give you the ability of typing source code (an operating system with a file system、源代码编辑器、文件管理器......来编程。
该编译器或解释器应该存在于您的计算机上(并且您在实践中还需要一些 operating system)。
您可以购买一台带有操作系统、编译器(或其中许多)的计算机 and/or 上面安装了一个解释器(您的供应商可能会进行下载和安装,您需要付钱给他为那项工作)。例如,许多 Linux distributions 拥有所有这些(我建议使用 Linux 来学习编程,这对学生和开发人员都非常友好)。
出于商业原因,Windows 没有安装所有这些。
在实践中,您需要许多其他程序来舒适地编写代码(source code editors, version control systems, command line interpreters, linkers, debuggers, build automation 工具,各种软件实用程序)。
you need to download a multitude of different softwares that enable you to begin programming.
一些编程环境更友好;例如DrRacket 大概是把几个工具打包在一起了。
如果您使用 C++ 编写代码,请不要混淆您将编译的 IDE you are using with your C++ compiler. Your IDE is likely to run a compiler (e.g. GCC) for you behind your back, and you'll better be able to run your C++ compiler on the command line. You generally want to enable all warnings and debug info, so with GCC 与 g++ -Wall -Wextra -g
。
Is it possible to open up notepad,
更好地学习使用好的、真实的、source code editor such as GNU emacs (it is free software). If coding in C++, you want syntax highlighting, automatic indentation and prettyprinting, autocompletion, brace matching 等....您将配置您的编辑器以满足您的需要。
program a compiler for c++
错误的术语。您不需要 编写 编译器,您只是 使用 现有的 C++ 编译器。实际上,C 和 C++ 编译器是 very complex pieces of software (because they are optimizing compilers), of many millions lines of source code. Both GCC and Clang/LLVM are free software C++ compilers (coded in C++ so bootstrapped);你可以下载他们的源代码并研究和改进它(为此你需要多年的工作)。