<commit_before>class: center, middle
# Object oriented programming

---

## What is object oriented programming?

--
Object oriented programming is the method to translate real word objects and ideas into programs that are idealized reflection of real life objects and their properties interactions.

--
Definitions, *platonic* ideas and blueprints of things, people, actions and other stuff that in natural language would be *common noun* or would have *indefinite article*, in programming language resembles to classes.

---


## Plain classes

### The simplest class
```javascript
function SomeClass(prop) {
  // this function body is constructor

  // if you set
  this.prop = prop;
}

var someClassInstance = new SomeClass('something');<commit_msg>some editions to classes<commit_after>class: center, middle
# Object oriented programming

---

## What is object oriented programming?

--
Object oriented programming is the method to translate real word objects and ideas into programs that are idealized reflection of real life objects and their properties interactions.

--
Definitions, *platonic* ideas and blueprints of things, people, actions and other stuff that in natural language would be *common noun* or would have *indefinite article*, in programming language resembles to classes.

---


## Plain classes

In JavaScript till ES6 there is no such native thing as classes. This situation makes OOP in JavaScript complicated but that's why I created this slide show for you.

### Functions

Let's talk about functions first
```javascript
function SomeClass(prop) {
  // this function body is constructor

  // if you set
  this.prop = prop;
}

var someClassInstance = new SomeClass('something');
{'fraction_non_alphanumeric': 0.06787595084844938, 'fraction_numerical': 0.0005851375073142189, 'mean_word_length': 4.445859872611465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6756893', 'n_tokens_mistral': 425, 'n_tokens_neox': 395, 'n_words': 216}