HolyC

4.5

软件描述

HolyC与普通的C语言非常相似,因此它是一种非常简单但功能强大的语言。它被用来编写了整个TempleOS,所以毫无疑问它可以用来编写程序。

官方网站

访问软件的官方网站了解更多信息

官方认证

holyc-lang.com

安全链接HTTPS

什么是 HolyC?

HolyC, as the name would imply, is a C-like programming language with a number of key differences and improvements. Like C, it’s whitespace independent and compiles to assembly. The most important difference is that HolyC uses "Just in Time" compilation, meaning you don't compile the code into a binary and run that (think a .exe file on windows), you just run the code directly from the file. Many interpreted languages like Python and Lua are like this, and some of these have JIT versions like PyPy and LuaJIT. But having a whole OS* like this is super awesome, you can just change a file and reboot, and you've changed the OS! Even in OSs like Linux or BSD where the source code is freely available, you have to download the source code and rebuild everything to change the OS itself, it's not nearly as friendly to hobbyists In addition to this excellent reply, this JIT “Just in Time” allows for so much versatility and simplicity. It’s like less middlemen’s interruptions. Also HolyC has a lot of syntactic sugar. Aka different ways to write the same things. That’s basically like having a dialect in human languages.Similarly to Python and other modern languages, functions can have variable argument counts, here specified with (...) in the function definition. The function body may then access its arguments by utilizing the built-in argc and argv variables Finally, HolyC does not have a required Main() function. Expressions outside of functions are simply evaluated from top to bottom in source. This also allows the programming language to act like a shell, and in-fact is the shell of TempleOS. Functions are where you start to see some of the more drastic differences. For starters, functions that are invoked without arguments (or without overriding any default arguments) may be syntactically shortened to just the function name followed by a semicolon. -In HolyC, you can Free() a null pointer (this is also true in C). -The stack does not grow because HolyC does not utilize virtual memory. -There is no continue keyword in the language. Instead, Terry urges programmers to use goto’s instead. -There is no #define capability. Terry’s explanation for this is that he’s just “not a fan”. -The typedef keyword is replaced with class. -#include does not support <> for importing standard libraries. All #include statements must use "". -There is no type checking what-so-ever. -try {}, catch {}, and throw are supported, however throw only returns up to an 8-byte char argument, which may be accessed in a catch {} as Fs->except_ch

评分4.5 / 5.0

下载与相关链接

安全提示
⚠️

安全提醒

点击下方链接将跳转到第三方网站,请确保来源安全,建议优先从官方网站下载。