Contents

program basic

What is the difference between a composite data type and a data structure? Data Types and Data Structures

variables

a container(memory address) hold a value;

a variable have a specific type

what is a data type?

具有相同属性的一类数据;

primitive; 基本 compositive:类型 composed of primitive types.

编程范例

Programming paradigm

Introduction of Programming Paradigms

Differences between Procedural and Object Oriented Programming

什么是编程范例

sytle: 编程语言解决问题或者执行任务的方式; 一门编程语言可能有多个范例;

常见的编程范例

https://media.geeksforgeeks.org/wp-content/uploads/1-344.png

imperative vs declarative

  1. imperative: 声明一系列方法(控制流程)获取想要的结果 (how to do)
  2. Decalrative: 声明获取结果的函数,没有中间的流程函数(what to do)

object oriented vs procedural

object oriented procedural
程序被拆分为一系列对象 程序被拆分为一系列方法
将 function 和 data放在对象里 使用function 操作 data

object oriented

https://cdn.shortpixel.ai/client/q_glossy,ret_img,w_459/https://vivadifferences.com/wp-content/uploads/2019/09/Object-Oriented-Programming.png

function

data from function to function to get a retult