差异和放大器;编程范式的共性 [英] Differences & Similarities Between Programming Paradigms

查看:219
本文介绍了差异和放大器;编程范式的共性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在为过去4年的开发人员,用4年以前在大学,学习软件开发。在我4年的行业我已经做了在VB6(这是一个笑话)了一些工作,但大部分已经在C#/ ASP.NET。在这段时间里,我从一个对象感知的程序范例面向对象的范式转移。

I've been working as a developer for the past 4 years, with the 4 years previous to that studying software development in college. In my 4 years in the industry I've done some work in VB6 (which was a joke), but most of it has been in C#/ASP.NET. During this time, I've moved from an "object-aware" procedural paradigm to an object-oriented paradigm.

最近我一直好奇其他编程范式在那里,所以我想我会问其他开发人员的意见上的相似性和放大器;这些范式之间的差异,具体以OOP?在OOP中,我发现有一个非常注重概念之间的关系和逻辑的相互作用。头脑帧你必须要为其他范式是什么?

Lately I've been curious about other programming paradigms out there, so I thought I'd ask other developers their opinions on the similarities & differences between these paradigms, specifically to OOP? In OOP, I find that there's a strong focus on the relationships and logical interactions between concepts. What are the mind frames you have to be in for the other paradigms?

推荐答案

到目前为止编程范式的最好的解释被发现在彼得·罗伊的作品。特别是在书中概念,技术和计算机编程的由彼得·范·罗伊和模型赛义夫Haridi 的。 (这里的同伴维基。)CTM使用 。多范型分布式盎司编程语言介绍所有主要的编程范式

By far the best explanations of programming paradigms are found in Peter van Roy's works. Especially in the book Concepts, Techniques, and Models of Computer Programming by Peter Van Roy and Seif Haridi. (Here's the companion wiki.) CTM uses the multi-paradigm Distributed Oz programming language to introduce all the major programming paradigms.

彼得·罗伊也做的this~~V惊人的海报,显示在不同的轴中的34个主要范式和他们的关系和立场。海报基本上是CTM的一个令人难以置信的压缩版本。该海报的更详尽的解释包含在文章编程范式傻瓜:每个程序员都应该知道这似乎是一个章节在书中的新的计算范式电脑音乐的,由G. Assayag和A. Gerzso编辑。

Peter van Roy also made this amazing poster that shows the 34 major paradigms and their relations and positions on various axis. The poster is basically an incredibly compressed version of CTM. A more thorough explanation of that poster is contained in the article Programming Paradigms for Dummies: What Every Programmer Should Know which appeared as a chapter in the book New Computational Paradigms for Computer Music, edited by G. Assayag and A. Gerzso.

另一个的伟大演示几个主要的编程范式本书是结构及解读计算机程序的哈罗德·阿贝尔森和杰拉德·杰伊·萨斯曼。这本书是麻省理工学院的CS101的几十年的基础。 由阿伯尔森和萨斯曼自己讲授的课程被记录在1986年惠普企业培训< /一>

Another great book that demonstrates several major programming paradigms is Structure and Interpretation of Computer Programs by Harold Abelson and Gerald Jay Sussman. This book was the basis of MIT's CS101 for several decades. A course taught by Abelson and Sussman themselves was recorded at a corporate training for Hewlett-Packard in 1986.

CTM和SICP​​之间的主要区别在于,CTM使用支持他们的语言说明了大多数主要范例(主要是分布式盎司,但也有一些其他)。 SICP OTOH通过展示他们的实施的他们,做一个语言的的支持他们本身(计划的一个子集)。眼看面向对象的代码十几线实行的是受诅咒的真棒。

The main difference between CTM and SICP is that CTM demonstrates most major paradigms using a language that supports them (mostly Distributed Oz, but also some others). SICP OTOH demonstrates them by implementing them in a language that does not support them natively (a subset of Scheme). Seeing Object-Orientation implemented in a dozen or so lines of code is friggin' awesome.

您可以找到的录像和教材从麻省理工学院的开放式课程网站 2005年春季课程。 麻省理工学院的短命ArsDigita大学项目过程中的另一个记录。 SICP也一直任教于其他大学,其实它正任教于伯克利现在

You can find video recordings and course materials from the Spring 2005 course on MIT's OpenCourseWare website. Another recording of the course from MIT's short-lived ArsDigita University project. SICP has also been taught at other universities, in fact it is being taught at Berkley right now.

就我个人而言,我自己的经验是,确实的理解一个编程范式是唯一可能

On a personal note, my own experience has been that really understanding a programming paradigm is only possible


  • 在每次一个范例和

  • 在语言其中的的你进范例

  • one paradigm at a time and
  • in languages which force you into the paradigm

在理想情况下,你会使用这需要范式到极致的语言。在多范型的语言,它是太容易作弊,并依傍一个范例,你更舒服。并使用模式作为库只在像方案语言这是专门为这种编程的设计真的有可能。 。学习在Java中偷懒功能编程,例如,是不是一个好主意,但也有对图书馆

Ideally, you would use a language which takes the paradigm to the extreme. In multi-paradigm languages, it is much too easy to "cheat" and fall back on a paradigm that you are more comfortable with. And using a paradigm as a library is only really possible in languages like Scheme which are specifically designed for this kind of programming. Learning lazy functional programming in Java, for example, is not a good idea, although there are libraries for that.

下面是一些我的最爱:


  • 面向对象一般

    • 基于原型的面向对象:自

    • 基于类的面向对象新话
      • object-orientation in general: Self
        • prototype-based object-orientation: Self
        • class-based object-orientation: Newspeak
          • static class-based object-orientation: Eiffel

          • 纯函数式编程:哈斯克尔

            • 懒纯函数式编程:哈斯克尔

            • pure functional programming: Haskell
              • lazy pure functional programming: Haskell

              • 消息传递并行编程二郎

              • message-passing concurrent programming: Erlang

              这篇关于差异和放大器;编程范式的共性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆