首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

React极简教程: Hello,World!React简史React安装Hello,World

A programming paradigm is a fundamental style of computer programming. There are four main paradigms: imperative, declarative, functional (which is considered a subset of the declarative paradigm) and object-oriented. Declarative programming : is a programming paradigm that expresses the logic of a computation(What do) without describing its control flow(How do). Some well-known examples of declarative domain specific languages (DSLs) include CSS, regular expressions, and a subset of SQL (SELECT queries, for example) Many markup languages such as HTML, MXML, XAML, XSLT… are often declarative. The declarative programming try to blur the distinction between a program as a set of instructions and a program as an assertion about the desired answer. Imperative programming : is a programming paradigm that describes computation in terms of statements that change a program state. The declarative programs can be dually viewed as programming commands or mathematical assertions. Functional programming : is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast to the imperative programming style, which emphasizes changes in state. In a pure functional language, such as Haskell, all functions are without side effects, and state changes are only represented as functions that transform the state. ( 出处:维基百科)

01

前几天有个同学问我,“什么是响应式编程”?另,它和函数式编程有啥区别?

前几天有个同学问我,啥叫响应式编程?当时我正在讲课没顾得上回他。今天晚上仔细写个文章回复他,顺便我自己也学习一下。 响应式编程的英文名,Reactive Programming,那就是针对响应的呗。那啥叫响应呢?你烧水呢,水烧开了,水壶会叫,这就是一下响应了。不要想的太复杂,这些东西都是基于现实世界的需要而来的。 响应式它是依赖于事件的,响应式的代码它的运行不是按代码的顺序,而是跟多个按时间发生的事件有关。可能你会想,依赖事件?这不就是“回调”嘛,但在响应式编程里,这些按时间排列的事件,被称为“流”,s

06
领券