Are there any low-level languages that can be used in place of scripts?

拜拜、爱过 提交于 2019-12-03 18:21:04

I recently stumbled upon something called BinaryPHP in which you code normally in php and then convert the script into C++ to be compiled on your favorite tool. That should be a nice learning curve for someone already in touch with php.

Im not sure I understand what you want to achieve, but tcc (tiny c compiler) allows you to run C programs as scripts.

http://linux.die.net/man/1/tcc

TCC can be invoked from scripts, just as shell scripts. You just need to add "#!/usr/local/bin/tcc -run" at the start of your C source:

#!/usr/local/bin/tcc -run
#include <stdio.h>

int main()
{
    printf("Hello World\n");
    return 0;
}

There are products like Beanshell for Java. They aren't intended to replace scripting languages but instead to allow an easy unit testing and debug capability to an existing language. In my opinion you should use a language for what it was designed for.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!