张8848 发表于 2023-2-28 23:09:43

还能用中文写代码?东北话:我先来整一个

<div id="img-content" class="rich_media_wrp">
         
         
         

         
                              

         
                  
                                       

         
                  

         
                              
                                       
                  
                  
         

         
         
                                                <div class="rich_media_content js_underline_content             autoTypeSetting24psection
            " id="js_content" style="visibility: visible; display: block;"><section style="color: rgb(52, 52, 52);line-height: 2;padding-right: 8px;padding-left: 8px;box-sizing: border-box;font-size: 16px;margin-bottom: 0px;"><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;">“会Python的人,工作都不会太差”。同事都在学编程,而我依旧卡在了英语这一关……面对满屏连不成句子的英文字,我就想问一问发明编程的人:fine,thank you]and you? <strong style="box-sizing: border-box;">“好优美的中国话”在编程界可以拥有姓名吗?</strong><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="display: inline-block;width: 100%;vertical-align: top;box-sizing: border-box;" powered-by="xiumi.us"><section style="line-height: 1.4;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;color: rgb(204, 204, 204);box-sizing: border-box;">满屏英文丨《Linux内核代码情景分析》</span></p></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">说真的, “从入门到放弃”的队伍里应该有不少人是被这密密麻麻的字母劝退的。想比数的大小,都得写好几行代码,直接输入“a和b谁更大”不好吗?</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">等等……<span style="color: rgb(72, 106, 183);box-sizing: border-box;"><strong style="box-sizing: border-box;">中文编程还真行</strong></span>,更贴心的<span style="color: rgb(72, 106, 183);box-sizing: border-box;"><strong style="box-sizing: border-box;">东北话、上海话甚至是文言文编程</strong></span>都有了,那接下来是入门还是放弃,就得看你自己了!</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="margin-top: 10px;margin-bottom: 10px;padding-right: 6px;padding-bottom: 6px;text-align: center;box-sizing: border-box;" powered-by="xiumi.us"><section style="padding-top: 6px;display: inline-block;background-color: rgb(220, 234, 244);box-sizing: border-box;"><section style="margin-right: -6px;margin-bottom: -6px;margin-left: 6px;background-color: rgb(74, 116, 212);color: rgb(255, 255, 255);padding-right: 6px;padding-left: 6px;font-size: 20px;box-sizing: border-box;"><p style="box-sizing: border-box;">东北话编程:我先来整一个</p></section></section></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">GitHub上有一个名为“dongbei”的项目,由用户zhanyong-wang开发。</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="line-height: 1.4;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;color: rgb(204, 204, 204);box-sizing: border-box;">东北话编程教程丨zhanyong-wan/dongbei/GitHub</span></p><p style="text-align: center;white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;">东北话编程把编程里的英文全部替换成了东北话,唠唠=print,没毛病=true,整完了=end……<br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">举个例子,如果你想用常规的编程语言在屏幕上输出一句话,以前得在编程软件里写成 print(“编程可真难!”),这要是换成东北话编程,直接写成 <strong style="box-sizing: border-box;">唠唠:“编程可真难!”</strong>。</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">再举个例子。如果想设置一个x,你在东北话编程里可以把x叫成老王,“老王走四步”就表示x+4,“老王稍五步”则表示x-5。</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">再比如想比两个数的大小,x叫老王,y叫老张。谁更大就输出“某某比较厉害”,相等就输出“一样厉害”。写成程序就是表格的左边:</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="display: inline-block;width: 100%;vertical-align: top;box-sizing: border-box;" powered-by="xiumi.us"><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">看,我用上毕生所学的东北话知识,总算是学废了一点dongbei。</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">既然是东北话编程,那不得整个东北特色小程序?想来想去我整了个<span style="color: rgb(72, 106, 183);box-sizing: border-box;"><strong style="box-sizing: border-box;">计算猪肉炖粉条所需食材数目</strong></span>的小程序:</p></section><section style="margin: 10px 0%;text-align: center;box-sizing: border-box;" powered-by="xiumi.us"><section style="display: inline-block;width: 95%;vertical-align: top;box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="display: inline-block;width: 100%;border-width: 1px;border-style: solid;border-color: transparent;padding: 10px;background-color: rgb(220, 234, 244);border-radius: 5px;box-shadow: rgb(0, 0, 0) 0px 0px 0px;box-sizing: border-box;"><section style="text-align: justify;line-height: 1.8;box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;">假设有一家菜单里只有猪肉炖粉条的饭店,店主需要<strong style="box-sizing: border-box;">根据顾客人数和食量准备食材</strong>。让我们来品味一下这种沙雕(亲切)的程序。</p></section></section></section></section></section></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="line-height: 1.4;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;color: rgb(204, 204, 204);box-sizing: border-box;">整点猪又炖粉条丨作者供图</span></p></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="line-height: 1.4;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;color: rgb(204, 204, 204);box-sizing: border-box;">程序的代码也是真·东北话代码丨作者供图</span></p><p style="text-align: center;white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="font-size: 15px;box-sizing: border-box;" powered-by="xiumi.us"><ol class="list-paddingleft-1"><li style="box-sizing: border-box;"><p>“装”表示把后面的内容赋值给前面,相当于“=”;</p></li><li style="box-sizing: border-box;"><p>“整”则代表运行,比如“咋整”下面就定义了“吃多少”这个部分是如何运行的,“整完了”就代表运行完了;</p></li><li style="box-sizing: border-box;"><p>判断两者是否相等变成了“寻思 xxx跟xxx一样一样的?”;</p></li><li style="box-sizing: border-box;"><p>用 “要行嘞就/要不行嘞就……”来判断不同的条件;</p></li></ol></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;">如果你会一点编程,看到这似曾相识的格式,是不是想拍案而起——<strong style="box-sizing: border-box;">这不就是Python嘛!</strong>没错,dongbei正是基于Python3开发的,你甚至可以<span style="color: rgb(72, 106, 183);box-sizing: border-box;"><strong style="box-sizing: border-box;">尝试把它反推成英文。</strong></span><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">基于这个思路,各地的方言都有机会加入“中文编程”的版图中来。这不,紧接着还有人开发了<span style="color: rgb(72, 106, 183);box-sizing: border-box;"><strong style="box-sizing: border-box;">基于上海方言词汇的编程语言</strong></span>。</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="display: inline-block;width: 100%;vertical-align: top;box-sizing: border-box;" powered-by="xiumi.us"><section style="line-height: 1.4;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;color: rgb(204, 204, 204);box-sizing: border-box;">侬上海言话讲得来伐?丨cabuliwallah/shanghai-from-dongbei/GitHub</span></p><p style="text-align: center;white-space: normal;box-sizing: border-box;"><br></p></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;">上面的编程方式虽然用的是中文,但整个语法基于英文编程,<span style="color: rgb(72, 106, 183);box-sizing: border-box;"><strong style="box-sizing: border-box;">看起来还是令人费解</strong></span>。19年发布的文言文编程项目“文言 / wenyan‑lang”更进一步,让编程看起来真的像古文了。<br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="margin-top: 10px;margin-bottom: 10px;padding-right: 6px;padding-bottom: 6px;text-align: center;box-sizing: border-box;" powered-by="xiumi.us"><section style="padding-top: 6px;display: inline-block;background-color: rgb(220, 234, 244);box-sizing: border-box;"><section style="margin-right: -6px;margin-bottom: -6px;margin-left: 6px;background-color: rgb(74, 116, 212);color: rgb(255, 255, 255);padding-right: 6px;padding-left: 6px;font-size: 20px;box-sizing: border-box;"><p style="box-sizing: border-box;">文言文编程:吾有一术</p></section></section></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section></section><section style="display: inline-block;width: 100%;vertical-align: top;overflow-x: auto;box-sizing: border-box;" powered-by="xiumi.us"><section style="overflow: hidden;width: 200%;max-width: 200% !important;box-sizing: border-box;"><section style="display: inline-block;vertical-align: middle;width: 50%;box-sizing: border-box;" powered-by="xiumi.us"><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;border-width: 0px;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section></section><section style="display: inline-block;vertical-align: top;width: 50%;box-sizing: border-box;" powered-by="xiumi.us"><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section></section></section></section><section style="line-height: 1.4;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;color: rgb(204, 204, 204);box-sizing: border-box;">左边用文言文编程表述5+3=8,右边是输出斐波那契数列的示例</span></p><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;color: rgb(204, 204, 204);box-sizing: border-box;">(←向左滑动)丨wenyan-lang/wenyan/GitHub</span></p><p style="text-align: center;white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;">相比直接的关键词替换,文言文编程的书写<span style="color: rgb(72, 106, 183);box-sizing: border-box;"><strong style="box-sizing: border-box;">更接近自然语言</strong></span>。同样的1+2,既可以写“加二於一”,也可以写“加一以二”,<strong style="box-sizing: border-box;">这两种写法都会被识别</strong>,并通过NLP(自然语言处理)的算法,翻译成JavaScript和Python。<br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="display: inline-block;width: 100%;vertical-align: top;box-sizing: border-box;" powered-by="xiumi.us"><section style="line-height: 1.4;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;color: rgb(204, 204, 204);box-sizing: border-box;">文言语言编程入门教程。这还得考文言文能力丨wy-lang</span></p></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">目前,该项目在GitHub上获得17k星星——要知道在4亿个仓库里只有不到800个有此殊荣。文言文编程项目不仅有了更全面的配套工具(被命名为“文渊阁”开发环境和包管理器),还有了详细的官方教程——当然也是文言文版的。可以说这个文言文编程项目已经非常完善了。</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">如此看来,中文编程大有前途?</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="margin-top: 10px;margin-bottom: 10px;padding-right: 6px;padding-bottom: 6px;text-align: center;box-sizing: border-box;" powered-by="xiumi.us"><section style="padding-top: 6px;display: inline-block;background-color: rgb(220, 234, 244);box-sizing: border-box;"><section style="margin-right: -6px;margin-bottom: -6px;margin-left: 6px;background-color: rgb(74, 116, 212);color: rgb(255, 255, 255);padding-right: 6px;padding-left: 6px;font-size: 20px;box-sizing: border-box;"><p style="box-sizing: border-box;">中文编程:请叫我古董</p></section></section></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">早期国内的英文教育并不是特别普及,而学习编程的过程涉及到很多资料与技术文档——这些大多都是英文的,有些人就想着:不如把整个编程都给汉化,这样学起来、用起来,都更方便。后来出现了以“易语言”为代表的中文编程工具。</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="line-height: 1.4;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;color: rgb(204, 204, 204);box-sizing: border-box;">00年前的中文编程丨中国知网截图</span></p></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="line-height: 1.4;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;color: rgb(204, 204, 204);box-sizing: border-box;">中文编程甚至有过专门的图书教程丨《中文编程从入门到精通》</span></p><p style="text-align: center;white-space: normal;box-sizing: border-box;"><br></p></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;">其实,“本土化编程语言”不止在中国被提出了。通过关键词替换等方法,人们可以将编程里的文字替换成<span style="color: rgb(72, 106, 183);box-sizing: border-box;"><strong style="box-sizing: border-box;">中文、俄文甚至是Emoji</strong></span>。<br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="line-height: 1.4;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;color: rgb(204, 204, 204);box-sizing: border-box;">Emoji编程丨EmojiCode.org</span></p><p style="text-align: center;white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;">既然群众呼声这么高、实践这么早,<strong style="box-sizing: border-box;">为什么本土化的编程语言仍然不是主流呢?</strong><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;"><span style="color: rgb(72, 106, 183);box-sizing: border-box;"><strong style="box-sizing: border-box;">程序语言的本质不是任何自然语言:不是中文也不是英语。</strong></span>它是根据特定语法规则拼起来一堆符号,更像人造的语言。编程用的是Java、C语言或者Python,都是这种“人造语言”,只不过它们所使用的“符号”恰好是英文单词。</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">但<span style="color: rgb(72, 106, 183);box-sizing: border-box;"><strong style="box-sizing: border-box;">机器也没法直接看懂这些这些“人造语言”</strong></span>,这时就需要编译器了。它会像翻译员一样,将人类所写的最接近自然语言的高级编程语言,一层层“翻译”到低级的机器语言,直到二进制编码——0和1。</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="line-height: 1.4;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;color: rgb(204, 204, 204);box-sizing: border-box;">左边是我们写的代码,经过一步步“翻译”最终成右边机器可以识别的二进制码丨codeforwin</span></p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;">现在通用的编程语言,只是<strong style="box-sizing: border-box;">恰好用英语单词作为符号。</strong>那用汉字来表示这些符号,也就是用中文编程,不是也挺好吗?<br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;"><span style="color: rgb(72, 106, 183);box-sizing: border-box;"><strong style="box-sizing: border-box;">的确可以,但或许没有必要。</strong></span></p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">非英语编程的壁垒之一在于,底层的语言被英语世界占领——接近硬件层面的语言,用的符号还是英语单词。这就意味着,如果将中文作为接口搭载在主流编程语言上,<strong style="box-sizing: border-box;">会多一次“将汉字翻译成英文字”的过程,增加了机器处理的时间,牺牲了效率。</strong></p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">同时,如果直接使用中文作为编程符号,会降低世界范围内的通用性。毕竟,编程语言不只是关键字,<strong style="box-sizing: border-box;"><span style="color: rgb(72, 106, 183);box-sizing: border-box;">更包括第三方库、学习材料等技术生态。</span></strong>如果你用中文版我用英文版,交流起来恐怕是鸡同鸭讲。</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">总而言之,虽然以英文字为基础的编程语言学起来要花时间,但综合权衡效率和难易度,程序员还是更倾向于使用主流语言。</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p><p style="white-space: normal;box-sizing: border-box;">这么说来,中文编程只能用来娱乐?倒也不是。中文编程可以<strong style="box-sizing: border-box;">让想了解编程的人了解基础的编程思路,还可以用于培养编程思维。</strong>针对孩子的编程语言scratch,甚至没有一个单词。</p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="line-height: 1.4;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;color: rgb(204, 204, 204);box-sizing: border-box;">Scratch图形化编程,只需要拖拽各个模块就可以让右边的猫猫做出特定的动作,这种编程更像是学习流程图丨Wikimedia Commons</span></p><p style="text-align: center;white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;">如果把“实用”换成“有趣”来看这个问题的话,中文编程确实给大家提供了一些新鲜的角度,或许也吸引了一批人加入了编程的行列啊!<br style="box-sizing: border-box;"></p></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="display: flex;align-items: center;box-sizing: border-box;"><section style="flex: 1 1 auto;height: 1px;background-color: rgb(204, 204, 204);box-sizing: border-box;"><section><svg viewBox="0 0 1 1" style="float:left;line-height:0;width:0;vertical-align:top;"></svg></section></section><section style="flex: 0 1 auto;box-sizing: border-box;"><section opera-tn-ra-cell="_$.pages:0.layers:0.comps:38.col1" style="padding-right: 15px;padding-left: 15px;box-sizing: border-box;"><section style="text-align: center;color: rgb(205, 204, 204);font-size: 14px;line-height: 1.61;box-sizing: border-box;" powered-by="xiumi.us"><p style="box-sizing: border-box;">参考文献<br style="box-sizing: border-box;"></p></section></section></section><section style="flex: 1 1 auto;height: 1px;transform: matrix(-1, 0, 0, 1, 0, 0);-webkit-transform: matrix(-1, 0, 0, 1, 0, 0);-moz-transform: matrix(-1, 0, 0, 1, 0, 0);-o-transform: matrix(-1, 0, 0, 1, 0, 0);background-color: rgb(204, 204, 204);box-sizing: border-box;"><section><svg viewBox="0 0 1 1" style="float:left;line-height:0;width:0;vertical-align:top;"></svg></section></section></section></section><section style="line-height: 1.61;color: rgb(205, 204, 204);padding-right: 8px;padding-left: 8px;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: left;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"> https://github.com/zhanyong-wan/dongbei</span></p><p style="text-align: left;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"> https://github.com/cabuliwallah/shanghai-from-dongbei</span></p><p style="text-align: left;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"> https://ide.wy-lang.org/</span></p><p style="text-align: left;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"> https://medium.com/@rats/java-basics-how-java-is-understood-by-your-machine-57161a212b85</span></p><p style="text-align: left;white-space: normal;box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;">大连易翔软件开发有限公司.《<span style="text-align: justify;box-sizing: border-box;">中文编程·从入门到精通</span>》.海洋出版社.2011.</span></p><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="font-size: 12px;color: rgb(120, 120, 120);line-height: 2;letter-spacing: 0px;box-sizing: border-box;" powered-by="xiumi.us"><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="color: rgb(204, 204, 204);letter-spacing: 0px;box-sizing: border-box;">作者:一座头鲸</span></p><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="color: rgb(204, 204, 204);letter-spacing: 0px;box-sizing: border-box;">编辑:Owl、Luna</span><br style="box-sizing: border-box;"></p><p style="text-align: center;white-space: normal;box-sizing: border-box;"><span style="color:#cccccc;box-sizing: border-box;">感谢研发部Andrija的支持</span></p></section><section style="box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;"><br style="box-sizing: border-box;"></p></section><section style="display: inline-block;width: 100%;vertical-align: top;box-sizing: border-box;" powered-by="xiumi.us"><section style="margin-top: 10px;margin-bottom: 10px;text-align: left;justify-content: flex-start;box-sizing: border-box;" powered-by="xiumi.us"><section style="padding-left: 1em;padding-right: 1em;display: inline-block;text-align: center;box-sizing: border-box;"><span style="display: inline-block;padding: 0.3em 0.5em;border-radius: 0.5em;background-color: rgb(74, 116, 212);color: rgb(255, 255, 255);box-sizing: border-box;" title="" opera-tn-ra-cell="_$.pages:0.layers:0.comps:42.col1:0.title1"><p style="box-sizing: border-box;">&nbsp;一个AI&nbsp;</p></span> </section><section style="border-width: 1px;border-style: solid;border-color: rgb(74, 116, 212);margin-top: -1em;padding: 20px 10px 10px;background-color: rgb(235, 241, 244);text-align: center;box-sizing: border-box;"><section style="text-align: justify;font-size: 15px;line-height: 2;letter-spacing: 0.5px;padding-right: 8px;padding-left: 8px;box-sizing: border-box;" powered-by="xiumi.us"><p style="white-space: normal;box-sizing: border-box;">?以后我们AI打招呼,都会有不同口音了?</p></section></section></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section><section style="text-align: center;font-size: 12px;color: rgb(204, 204, 204);padding-right: 8px;padding-left: 8px;line-height: 1.5;box-sizing: border-box;" powered-by="xiumi.us"><p style="box-sizing: border-box;"><span style="box-sizing: border-box;"></span></p><p style="box-sizing: border-box;"><span style="letter-spacing: 0px;box-sizing: border-box;"></span></p></section><section style="text-align: center;margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;" powered-by="xiumi.us"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;"><div class="image-zoom-tip"></div><div style="text-align:center"></div></section></section></section></section><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p></div>

         
      </div><br><br><br>来源网址:https://www.guokr.com/article/463412
页: [1]
查看完整版本: 还能用中文写代码?东北话:我先来整一个