简体   繁体   English

是否有任何关于函数式/声明式或命令式编程是否更容易作为第一语言学习的研究?

[英]Are there any studies on whether functional/declarative or imperative programming is easier to learn as a first language?

Not best to learn, but easiest to learn.不是最好学,但最容易学。 Not easiest for programmers, but for non-programmers (as a first language).对于程序员来说不是最简单的,但对于非程序员(作为第一语言)来说。 Not opinions or anecdotes, but are there any studies?不是意见或轶事,但有任何研究吗?

I think that functional/declarative programming (Haskell, Scheme, Lisp etc) is more powerful and more abstract than imperative programming, and therefore is intrinsically harder to learn.我认为函数式/声明式编程(Haskell、Scheme、Lisp 等)比命令式编程更强大、更抽象,因此本质上更难学习。 I wonder if there is any actual evidence, one way or the other.我想知道是否有任何实际证据,一种或另一种方式。

Matthias Felleisen and his colleagues have assembled some very convincing evidence that the easiest language to learn is a language that is designed for beginning programmers and has tool support aimed at beginning programmers . Matthias Felleisen 和他的同事收集了一些非常有说服力的证据,证明最容易学习的语言是为初级程序员设计的语言,并且具有针对初级程序员的工具支持 They have actually designed and implemented four such languages, each a subset of the next, and all subsets of Scheme.他们实际上已经设计并实现了四种这样的语言,每种语言都是下一种语言的子集,以及 Scheme 的所有子集。 They have some very convincing papers, pedagogy, and software .他们有一些非常有说服力的论文、教学法和软件 Also, their results have been replicated in Germany as shown by impressive published results in the latest FDPE workshop, as well as many good but unpublished work in high schools.此外,他们的结果在德国得到了复制,最新的 FDPE 研讨会上发表的令人印象深刻的结果以及在高中的许多优秀但未发表的作品都证明了这一点。

The take-away message is not that Scheme is good for learning, but rather that beginning programmers need tools and languages (they call them "language levels") designed just for them.要点并不是说 Scheme 对学习有好处,而是初学者需要专为他们设计的工具和语言(他们称之为“语言级别”)。 I believe this language-level concept could be applied to other languages, including C (which I teach at the introductory level), but unfortunately Felleisen et al have not published a set of principles or guidelines that would allow someone to replicate their work using a different language.我相信这个语言级别的概念可以应用于其他语言,包括 C(我在入门级别教授),但不幸的是 Felleisen 等人还没有发布一套原则或指南,允许某人使用不同的语言。

So if it's evidence you're looking for, the only available data conflate the use of the functional language with the use of language levels and a custom-designed programming environment.因此,如果您正在寻找证据,那么唯一可用的数据会将函数式语言的使用与语言级别的使用和定制设计的编程环境混为一谈。 You'll have to judge for yourself which factors are most important.您必须自己判断哪些因素最重要。 I know that if language levels and a "student's programming environment" were available for C, I would choose that in a heartbeat over, say, full Scheme and the Bigloo Scheme compiler.我知道,如果 C 可以使用语言级别和“学生的编程环境”,我会立即选择它,而不是完整的 Scheme 和 Bigloo Scheme 编译器。

No, it's too hard to come up with a meaningful study that controls for all the variables.不,很难想出一个有意义的研究来控制所有变量。 See also也可以看看

Are there statistical studies that indicates that Python is "more productive"? 是否有统计研究表明 Python “生产力更高”?

The best language for beginners is going to be the one with the fewest things to understand.对于初学者来说,最好的语言是要理解的东西最少的语言。

Neither Functional nor OO languages are particularly easy in that way--completely straight-forward to grasp (although both can reduce to something pretty simple, but the fact that all that other syntax and functionality is hanging out there is actually an issue--it makes people want to understand it, they feel like they are missing something when looking at more complicated code, etc.)函数式和 OO 语言在这种方式上都不是特别容易——完全可以直接掌握(尽管两者都可以简化为非常简单的东西,但是所有其他语法和功能都存在的事实实际上是一个问题——它让人们想要理解它,当他们看到更复杂的代码时,他们觉得他们错过了一些东西,等等)

I hate to say it, but the best languages were probably the old Basic and Pascal.我不想这么说,但最好的语言可能是旧的 Basic 和 Pascal。 Very few tricks--heck, basic didn't even have functions at first!很少的技巧——哎呀,一开始basic甚至没有功能!

This lets you concentrate on understanding variables and program flow before being hit with stuff like objects, pointers and immutability.这使您可以在遇到对象、指针和不变性等内容之前专注于理解变量和程序流程。

That said, if your question wasn't just theoretical you might look into BlueJ.也就是说,如果您的问题不仅仅是理论上的问题,您可能会研究 BlueJ。 It's a Java IDE made exclusively for training.这是专为训练而设计的 Java IDE。 It doesn't require the hardest java syntax such as "public static void main()" and "System.out.print"--They are unnecessary because of the unique way it deals with objects.它不需要最难的 java 语法,例如“public static void main()”和“System.out.print”——它们是不必要的,因为它处理对象的方式独特。 It also introduces students to UML and gives an instant understanding of Objects.它还向学生介绍了 UML,并让他们立即了解对象。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM