How "language oriented programming" compares with OOP / Functional in the real world

I recently started reading literature related to F #, which talked about "functional programming of the real world" and "Expert F #". g .. In the beginning, this is easy, because I have some background in Haskell and know C #. But when it comes to Language Oriented Programming, I just don't get it. - I read some explanations, and I like to read an academic article, which becomes more abstract and strange with each sentence.

Does anyone have an easy example for this kind of thing and how does it compare with existing paradigms? This is not just an academic fantasy, is it ?;)

Thank wishi

+3
source share
6 answers

F # has several mechanisms for programming in a style that can be called "language oriented."

Firstly, syntactic subtleties (function calls do not require brackets, they can define their own infix operators, ...) make many user libraries look like built-in DSLs.

Secondly, the F # "quotations" mechanism can allow you to quote code and then run it using an alternative semantics / evaluation mechanism.

Thirdly, F # "calculation expressions (for example, workflows, monads, ...) also provide a way to provide alternative semantics for certain blocks of code.

All of these species fall into the EDSL category.

+9

(LOP) .

(DSL)

, , LOP, - , UPS .. , , , . , .

, , "", . , " ". : . , F # , .

LOP , .

+10

- . ... .

- , .

+5

, .

, , , DSL (http://en.wikipedia.org/wiki/Domain_Specific_Language), .

DSL , DSL.

, DSL , .

make Ruby on Rails ActiveRecord.

+2

( ), , .

- Lisp " ", "" . Cucumber - , .

, ( , ) . , , , , , . () - .

+2

, , , SQL. : UNIX.

, , , , .

0

Source: https://habr.com/ru/post/1722372/


All Articles