本文介绍了哪种编程语言具有最少的“命令”/关键字? (纯娱乐)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在做一系列的编程讲座,这些都不是关于函数式编程方面,更多是关于编程的理念,也是为了激发青少年学习编程。 因此,拥有一个只有很少命令的函数式编程语言会很有趣,这样我就可以向它们展示一些简单的东西。 是的,我可以使用C#中的一个简单的解释器制作我自己的伪代码语言(这是我的计划),但是有一些实际编译的15个关键字真的很有趣。 br /> 任何人有任何快速解答?I'm doing a set of programming lectures, these are less about the functional programming aspect, and more about the philosophy of programming and to inspire teens to look into programming.So it would be fun to have a functional programming language that had very few "commands", so that I can show them something simple that does complex things.Yes I could make my own "pseudocode language", with a simple "interpreter" in C#, (which is my plan), but it would be fun to have something real with 15-ish "keywords" that actually compile.Anyone have any quick answers?推荐答案 Matt T Heffron问:Matt T Heffron asked:你怎么定义负数关键字??Just how would you define "negative number of keywords" ??我期待这个问题,但希望你能猜出怎么做。当然。 这个概念应该与自定义关键字的概念相关。你有没有得到这个想法? 我不想讨论自定义关键字可能意味着什么,它可能以不同的方式介绍。重要的是要理解它不应该是类型,对象,方法的名称,不像开发人员定义的通常名称,它应该是一个关键字。它应该由用户定义,扩展语言,并且从那个时刻开始可用。现在,让我们假设引入了这样的概念。 因此,特别是,如果某种语言(最初在定制之前)的关键字为零,则表示以下内容:用户可以自定义它,例如,通过添加一个可以进一步使用的关键字。现在,我们可以设计一种语言,例如-5个关键字。这将是具有以下属性的语言:要将语言自定义为只有一个可用关键字,客户需要添加6个关键字;要获得5个可用的关键字,客户需要添加10个,依此类推。 如果自定义关键字的概念已经可用,那么使用负数关键字的语言的实现将非常简单。 :-) -SAI expected this question, but hoped that you would guess how. Of course.The concept should be related to the idea of a "custom keyword". Are you getting the idea already?I don't want to discuss what a "custom keyword" may mean, it could be probably introduced in different ways. It's important to understand that it should not be a name of the type, object, method, nothing like a usual name defined by a developer, it should really be a "keyword". It should be defined by the user, extend the language, and be usable since that moment of time. For now, let's just assume that such concept is introduced.So, in particular, if some language, originally, before customization, has zero keywords, it means the following: the user can customize it, for example, by adding one keyword which can further be used. Now, we can devise a language that has, say, −5 keywords. This would be the language with the following property: to customize the language to have just one usable keyword, the customer will need to add 6 keywords; to get 5 usable keywords, the customer would need to add 10, and so on.Provided the concept of the "custom keyword" is already available, the implementation of the language with negative number of keywords would be really quite simple. :-)—SA 这篇关于哪种编程语言具有最少的“命令”/关键字? (纯娱乐)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-21 15:57