Is there a math theory or a model behind programming languages design

I’m trying to understand if a programming languages design is built on some a theoretical model.
I came across few links that was describing Programming Language Theory, Lambda Calculus, Formal Languages and Turing machine.

I got lost in all that theory, what I understood from all that is that (any ..?) programming language is built on lambda calculus, that boils down to few language constructs.

  1. is my understanding correct?
  2. are there any models other than lambda calculus?
  3. if the languages shares the same model, can we use that to convert a source code from one language to the other?

3

You’re partially right.

Lambda calculus is base for understanding how functional programming WORK.

Turing machine is base for understanding how imperative programming WORK.

Formal languages are ways of WRITING programms.

Lambda calculus and Turing machine are totally different, but both in some way do the same as sentence “if you add two and three, you get five” for math.

Formal languages are ways of saying “2+2 means ‘add two and two'”.

PS. @SK-logic: yes, you are right. This above is simplification, realy close to being false. Still, answer was written for complete newbie in topic, it was intended to give him SLIGHTEST idea, so he can choose what is more interesting for him, and where he want to start learning.

1

I got lost in all that theory, what I understood from all that is that
(any ..?) programming language is built on lambda calculus,

Not in the sense that a PL designer needs to know and start out with the lambda calculus, but see below.

are there any models other than lambda calculus?

Yes, sure. For example, the SKI combinator calculus. Or register machines (basically, the van Neumann model).

The point is that any turing complete system could serve as basic for programming languages. Or, to put it differently, you could explain any language in terms of any computational complete system.

if the languages shares the same model, can we use that to convert a source code from one language to the other?

It makes it certainly easier.
Yet, from what I said above, it is rather the case that we can convert any language to any other language. (It’s just not practical in most cases to do so.)

is my understanding correct?

Not really. Functional programming is more a set of features originally inspired by lambda calculus than a foundation for an entire language design. Some purely functional languages might come close but I suspect they’d still have to have some rules that don’t relate directly to lambda calculus. And of course not all languages have the features required for functional programming.

are there any models other than lambda calculus?

If by that you mean feature sets inspired by other branches of mathematics, then absolutely, without a doubt. Basic features implemented in most languages are tied directly to all manner of specific branches of math. But not all features necessarily are. Object Oriented Programming, for instance, is a concept meant to help programmers structure and model code more intuitively while avoiding some of the pitfalls people tend to run into in procedural programming. If it has a direct branch of mathematics analogue, I’ve never seen that pointed out anywhere.

if the languages shares the same model, can we use that to convert a
source code from one language to the other?

Well, what does “same model” mean. They follow all the same rules, varying slightly only in syntax? That would be easy enough. But a single core rule-change could make translating one to the other very messy. Strict vs dynamic types for instance. How would you write a JavaScript object’s methods to follow all the same rules as a Java object? Other features like how scope works, or the absence/presence of closures would require a lot of overhead to emulate in universal way between language paradigms.

I think the closest thing to a common link you could find between all languages is that ultimately they all have to boil down to instructions that can somehow be broken down and executed in machine code terms on a given system (and machine code varies depending on architecture too). The complexity inherent in making a universal programming translator would be both insanely hard, if possible, but also massively fail to produce legible translated code between languages without massaging and special libraries that would make it fail the ‘universal’ test. I wouldn’t be shocked if someone had proven this feat to be technically impossible.

I’m trying to understand if a programming languages design is built on some a theoretical model.

No unifying theory has surfaced, but different aspects of programming languages are studied separately and may introduce their own theories. To name a few:

  • Type systems
  • Exception handling mechanisms and models
  • Co-routines
  • Concurrency stuff (models and mechanisms)
  • Macros
  • Binding/composition/extensions (ex: aspects, subject-oriented, context-oriented, prototypes, traits, multi methods, predicate dispatch, etc)

I came across few links that was describing Programming Language Theory, Lambda Calculus, Formal Languages and Turing machine.

These are more used and appropriated to investigate limits of computation, etc. Though lambda calculus (and other calculi) is used as medium to model programming mechanisms to be used in practice.

I got lost in all that theory, what I understood from all that is that (any ..?) programming language is built on lambda calculus, that boils down to few language constructs.

Depends on how you interpret “built on lambda calculus”. Many language are not designed from lambda calculus (or any other formal system), that is, a designer does not start with lambda calculus and end up with, say, Go. These two just share a theoretical correspondence, and when you want to investigate computational complexity, you go to these systems which are better suited for such study.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật