Introduction to Programming - Types of Languages, Memory Management
الملخص
TLDRThe video explains various types of programming languages including procedural, functional, and object-oriented programming. It emphasizes that programming languages allow for human-readable code that instructs computers, which ultimately operates using binary. Procedural languages involve a series of structured instructions, whereas functional programming relies on pure functions without altering original data. Object-oriented programming integrates code and data into objects using classes. It also contrasts static versus dynamic languages in terms of type checking during compile and runtime. Finally, the video touches on memory management concepts, including stack, heap, and garbage collection.
الوجبات الجاهزة
- 💻 Programming languages turn human ideas into machine-readable code.
- 📜 Procedural languages follow structured steps to complete a program.
- 🔄 Functional programming uses pure functions and doesn’t modify original data.
- 🧩 Object-oriented programming combines code and data into objects.
- ⚖️ Static languages check types at compile time, dynamic at runtime.
- 🗄️ Memory management includes stack memory for variables and heap for objects.
- 🗑️ Garbage collection removes objects with no reference variables.
- 🔄 Functions allow code reuse across multiple problems and files.
- 📚 Understanding language types is crucial for data structures and algorithms.
الجدول الزمني
- 00:00:00 - 00:05:00
In this introduction, the creator emphasizes the importance of understanding programming languages like Java, Python, and C++ as foundational elements for data structures and algorithms, highlighting that all computing is fundamentally based on binary (zeros and ones).
- 00:05:00 - 00:10:00
The video discusses what programming languages are and how they enable developers to give instructions to computers, illustrating the concept of code as human-readable performance that is converted internally into binary by the machine.
- 00:10:00 - 00:15:00
The next section introduces procedural programming languages, which are characterized by a sequence of structured steps, or procedures, necessary for completing tasks, noting that popular languages like Java, Python, and C++ follow this model.
- 00:15:00 - 00:20:00
Functional programming is explained next, where functions are used to provide reusable code segments. The concept of pure functions is introduced, emphasizing that they do not modify input variables but can produce new output, with first-class functions as a key feature of this paradigm.
- 00:20:00 - 00:25:00
Moving on to object-oriented programming, the video defines it as a model that combines data and code into objects, illustrating how custom data types (classes) allow for better organization and maintainability of code.
- 00:25:00 - 00:30:00
The discussion transitions into exploring static versus dynamic typing in programming languages, detailing how static languages check types at compile time while dynamic languages do so at runtime, showcasing the pros and cons of both approaches.
- 00:30:00 - 00:39:02
Finally, the creator wraps up with a brief explanation of memory management in programming, clarifying the roles of stack and heap memory, reference variables, and the process of garbage collection where unreferenced objects are cleared from memory.
الخريطة الذهنية
فيديو أسئلة وأجوبة
What are the types of programming languages discussed?
The video covers procedural, functional, and object-oriented programming languages.
What is a procedural language?
A procedural language specifies a series of structured steps to complete a program.
What is functional programming?
Functional programming emphasizes writing programs using pure functions without modifying variables.
What is object-oriented programming?
Object-oriented programming combines code and data into objects defined by classes.
What is the difference between static and dynamic languages?
Static languages perform type checking at compile time, while dynamic languages determine types at runtime.
What is memory management in programming?
Memory management involves how variables and objects are stored in stack and heap memory.
What is garbage collection?
Garbage collection automatically frees memory from objects that have no reference variables pointing to them.
How do functions work in programming?
Functions bundle code that can be reused, allowing for efficient programming across multiple files.
Why is understanding types of languages important?
It helps in grasping foundational programming concepts that are applicable in data structures and algorithms.
عرض المزيد من ملخصات الفيديو
The Most Hated Woman In America Is Now On TikTok... | Casey Anthony
Posisi Utang Pemerintah Capai Rp 9.000 Triliun, Kok Ditutup-tutupi?
You'll Never Doomscroll Again If You Do This In 2025
BELAJAR FOREX DARI NOL sampai MAHIR | TRADING MASTERCLASS
Modul A - Uji Tarik
PAC-12 Getting their Autonomous Status Back? - Plus Memphis AD Comments and Olympic Sports
- 00:00:04hey everyone
- 00:00:05welcome back to the channel and in this
- 00:00:07video we are learning about
- 00:00:08types of languages this is important in
- 00:00:11order to understand you know when we
- 00:00:12will be doing like
- 00:00:13data structures algorithms and even
- 00:00:15though we'll be doing it in java you
- 00:00:17have to you know have a basic idea about
- 00:00:18what all these things
- 00:00:20are and what type of languages you are
- 00:00:21working with be that java
- 00:00:23python or c plus plus so without further
- 00:00:26ado let's just
- 00:00:27jump right into it you know computers
- 00:00:30like
- 00:00:33internally like you know at the very
- 00:00:35minute details it's just bunch of zeros
- 00:00:37and ones
- 00:00:37okay binary numbers and we'll look more
- 00:00:39into like how binary numbers are
- 00:00:41actually stored in memory
- 00:00:42and whatever you know how we convert
- 00:00:44normal decimals to binaries and
- 00:00:46all these other things the memory
- 00:00:48management all of these things will be
- 00:00:49covered in the
- 00:00:50future lectures speaking of programming
- 00:00:53languages
- 00:00:54what are programming languages
- 00:00:55programming languages allow us to you
- 00:00:57know we have some idea
- 00:00:58and we write that in form of a code and
- 00:01:00we get the output for that like whatever
- 00:01:02you want to do let's say you want to
- 00:01:04you know create a function or let's say
- 00:01:06not if i if you don't
- 00:01:07if you're not aware of functions let's
- 00:01:09say you want to create a program
- 00:01:11okay that takes input of all the
- 00:01:14students in your class
- 00:01:15okay or let's say you want to create a
- 00:01:17program that gives you the table of two
- 00:01:20or you want to create a program that
- 00:01:21just you know gives you a nice message
- 00:01:24like
- 00:01:24hi how are you and good morning and all
- 00:01:26these things
- 00:01:27so we can do that via like programming
- 00:01:29languages and
- 00:01:30um programming language is basically as
- 00:01:33i mentioned earlier like
- 00:01:35internally at the very minute details
- 00:01:37it's just a bunch of zeros and ones
- 00:01:39so when you are executing these
- 00:01:41instructions like you're instructing
- 00:01:42your computer
- 00:01:43hey computer please uh please you know
- 00:01:46um
- 00:01:46do this thing for me or tell me the time
- 00:01:49or
- 00:01:50hey computer please uh you know this is
- 00:01:52a program that i have for you like uh
- 00:01:54please print the
- 00:01:56you know date for today so these are
- 00:01:58basically just
- 00:01:59instructions that your cpu is giving
- 00:02:01like you know you're giving to your
- 00:02:02computers
- 00:02:04and computers contains all these things
- 00:02:05like there's a cpu
- 00:02:07there's a ram and how these how all
- 00:02:08these things work we'll look into
- 00:02:10uh later on so internally if it's just
- 00:02:14zeros and ones
- 00:02:15and uh instructions that you're giving
- 00:02:17to your computer
- 00:02:19it would be very difficult to write all
- 00:02:20these instructions in just
- 00:02:22zeros and ones okay there is a reason we
- 00:02:25have like
- 00:02:26programming languages that allows us to
- 00:02:28write all of these programs like okay
- 00:02:30computer do this
- 00:02:31take this output this perform this
- 00:02:33calculate this and do all these things
- 00:02:36that is the reason we have programming
- 00:02:37languages that we can write it in a
- 00:02:39human readable format
- 00:02:41in a human readable format internally
- 00:02:43computer is going to translate it in a
- 00:02:45bunch of zeros and ones
- 00:02:47a computer is problem not my problem
- 00:02:50okay
- 00:02:51cool let's look at the type of languages
- 00:02:53that we may have you might have heard
- 00:02:54about so many languages
- 00:02:56java c c plus plus python no and
- 00:02:59so many other languages the first one we
- 00:03:02are going to look into is called
- 00:03:03procedural language
- 00:03:04now procedural language like very
- 00:03:06initial you know years of programming
- 00:03:08as you can see on the screen it
- 00:03:10specifies a series
- 00:03:11of well-structured steps and procedures
- 00:03:15to compose a program
- 00:03:16now we can do this in you know it
- 00:03:19contains like uh
- 00:03:20an order of statements functions
- 00:03:23and commands to complete a task so for
- 00:03:25example it can be like hey
- 00:03:27first you have to input a number then
- 00:03:29you have to input the second number
- 00:03:31then you have to add the sum of that and
- 00:03:33then you have to print that
- 00:03:35you can also you know see you can see
- 00:03:37this flow of structure that is going
- 00:03:39is it at any point of time going to be
- 00:03:41input a number
- 00:03:42take the sum of the two numbers then
- 00:03:44input the second number
- 00:03:46it will not happen like that right you
- 00:03:47definitely need two numbers and then
- 00:03:49only you will do the sum
- 00:03:51so you can see the series of steps that
- 00:03:53are happening this can happen in many
- 00:03:54ways it can be
- 00:03:55loops if you don't know what loops are
- 00:03:56don't worry you can do this like in your
- 00:03:58statements cases
- 00:04:00functions so many other commands
- 00:04:02basically the idea is to complete a task
- 00:04:04like that
- 00:04:05now you might be wondering hey kunal so
- 00:04:07many languages do this
- 00:04:09i am personally let's say not let's say
- 00:04:11you might be like hey i don't let's say
- 00:04:13know that much about know all the
- 00:04:14languages but i'm pretty sure many
- 00:04:15languages do this
- 00:04:16and you are correct you are correct java
- 00:04:20does this
- 00:04:21python does this c plus plus does this
- 00:04:24so can we say like
- 00:04:25java c plus plus and python and all
- 00:04:27these other languages
- 00:04:28they follow the procedural language
- 00:04:31um the the properties of this
- 00:04:35most definitely they do all right now
- 00:04:38let's look at the next language
- 00:04:39next next type of language is the
- 00:04:41functional language functional language
- 00:04:43what is it
- 00:04:44so writing a pro program only in pure
- 00:04:46functions if you don't know what
- 00:04:48functions are
- 00:04:48do not worry we have a separate module
- 00:04:50for that later in the course
- 00:04:52functions are basically in simple
- 00:04:54language
- 00:04:56whenever i say this thing right whenever
- 00:04:58i say in simple language during the
- 00:04:59course
- 00:05:00that basically means understand what
- 00:05:02it's doing
- 00:05:03ignore how it's doing it because it will
- 00:05:06be covered later in the course
- 00:05:08if you want to google yourself you can
- 00:05:09do that for now just ignore how it's
- 00:05:11doing it because that is a separate
- 00:05:13module in the course
- 00:05:14functions is basically you bundle a code
- 00:05:17together in a particular
- 00:05:19you know let's say something and you can
- 00:05:20use that and reuse that many many times
- 00:05:23if someone asks you hey kunal uh you
- 00:05:26have 10 files
- 00:05:2710 programming files or whatever and in
- 00:05:30every file you have to
- 00:05:32you know take two numbers in sum them
- 00:05:36and print the sum does it make sense
- 00:05:39that i write this program again and
- 00:05:41again for 10 files
- 00:05:42i can just write this program in one
- 00:05:44file and use that particular program
- 00:05:46in every other file saves me time
- 00:05:50also will help me in changing the
- 00:05:51particular function the particular
- 00:05:53program
- 00:05:53if there's an error in the program i can
- 00:05:55just change the main one
- 00:05:56automatically all the ones will be
- 00:05:58changed rather than changing every
- 00:05:59single file
- 00:06:00functions allow us in doing that so pure
- 00:06:02functions are basically never modify the
- 00:06:04variables again if you're not aware of
- 00:06:06variables do not worry
- 00:06:07variable is simply if i'm saying a is
- 00:06:09equal to 10
- 00:06:10so a is a variable and the value of that
- 00:06:12is 10.
- 00:06:14name is equal to kunal name is a
- 00:06:16variable value is kunal
- 00:06:18we'll look into it later on in in this
- 00:06:20particular like shortly as shortly only
- 00:06:22in the next next videos so
- 00:06:25it it is never going to modify it but
- 00:06:28only create new ones as an output
- 00:06:30or in other cases like in simple terms
- 00:06:32if i want to share with you what
- 00:06:33functional programming languages are
- 00:06:35then it can be like used in situations
- 00:06:38where we have to perform lots of
- 00:06:40different operations on the same same
- 00:06:41set of data because it's not modifying
- 00:06:44the
- 00:06:45original data it's creating new one as
- 00:06:47an output
- 00:06:48if you're like hey i am doing machine
- 00:06:50learning here's the data set that i have
- 00:06:52for you
- 00:06:52i'm like okay cool this is my data set
- 00:06:54let's play with this data set
- 00:06:56and you know create some nice algorithms
- 00:06:58and machine learning
- 00:06:59models and whatever right so we are
- 00:07:03doing these things with this data set
- 00:07:05and i am like actually
- 00:07:07utilizing that data set you know uh for
- 00:07:10various operations
- 00:07:11and it might be the case that i'm not
- 00:07:12modifying the original file
- 00:07:14it might be the case that i'm taking a
- 00:07:15copy of that data manipulating it
- 00:07:17changing its type or whatever that i'm
- 00:07:18doing
- 00:07:20another example i can give you is they
- 00:07:21also follow first class functions
- 00:07:24now what are first class functions very
- 00:07:26simple do not worry
- 00:07:27this is very simple stuff first class
- 00:07:29function i'll explain to you right now
- 00:07:31functions are basically just you know
- 00:07:32block of code that i can reuse again and
- 00:07:34again
- 00:07:35many many simple things you can do in
- 00:07:37programming languages like a is equal to
- 00:07:3910
- 00:07:40name is equal to kunal a is equal to
- 00:07:44b that's a b let's say a is equal to
- 00:07:46let's say
- 00:07:47let's say number variable number i i'll
- 00:07:49just write it down over here
- 00:07:51let me just write it down so if i'm
- 00:07:54saying
- 00:07:56let's say in simple programming language
- 00:07:58term i'm saying a is equal to 10
- 00:08:00then i say b is equal to 30 and then i
- 00:08:02say c is equal to b
- 00:08:04so can you see that i reassigned c to b
- 00:08:07if i print c now if i try to get the
- 00:08:09value of c
- 00:08:10it's going to be equal to what the value
- 00:08:12of b which is 30
- 00:08:14so the value of c is also value of b 30
- 00:08:16do not worry about this we'll cover this
- 00:08:17later on
- 00:08:18but the important thing to note over
- 00:08:19here is can you see how i'm reassigning
- 00:08:21variables like this
- 00:08:23c to b and things like that this is
- 00:08:25basically
- 00:08:26means that if you are able to do such
- 00:08:28things with functions as well
- 00:08:31reassigning function variable name to
- 00:08:33other function you know doing all these
- 00:08:35other things
- 00:08:36that basically means that is like first
- 00:08:37class functions
- 00:08:39example for this language that follows
- 00:08:41these sorts of
- 00:08:43you know properties can be python
- 00:08:46python follows such properties python
- 00:08:47has first class functions
- 00:08:49may not be purely functional but it does
- 00:08:51follow the functional programming
- 00:08:53theories now you might be asking hey
- 00:08:54kunal you're saying python is procedural
- 00:08:56also
- 00:08:57saying it follows functionals also which
- 00:08:59one is it
- 00:09:00wait a minute let's look at object
- 00:09:02oriented what is object-oriented
- 00:09:04programming
- 00:09:05so again do not worry if you did not
- 00:09:07like get the gist of it just
- 00:09:08a basic understanding is fine do not
- 00:09:10worry if you did not get the details
- 00:09:12because we have a function
- 00:09:13section separate as a module and
- 00:09:16variables what are variables we will
- 00:09:18cover that in the next next videos
- 00:09:21in this video object-oriented
- 00:09:23programming it basically revolves around
- 00:09:26objects now what is object the idea is
- 00:09:29that code
- 00:09:30the code file that the code that we have
- 00:09:32plus the data
- 00:09:34if you combine these two together it
- 00:09:35forms an object
- 00:09:37what do i mean by an object let's say
- 00:09:39you are like hey kunal
- 00:09:40um can you please collect us a data for
- 00:09:43me
- 00:09:44of 10 people that contains the role
- 00:09:46numbers of those people
- 00:09:47okay that's a problem statement what is
- 00:09:50the type of this data going to be forget
- 00:09:52programming what is the type of role
- 00:09:54number going to be in simple terms
- 00:09:56integer integer let's say hey kunal
- 00:10:00create a collection of data that
- 00:10:02contains
- 00:10:04names of all the students what is the
- 00:10:06type of this data going to be
- 00:10:08string alphabets letters you're like hey
- 00:10:12kunal
- 00:10:13create a collection of data that
- 00:10:15contains all the addresses of people
- 00:10:17what is the type of this is going to be
- 00:10:18maybe like a it's going to be like a
- 00:10:20string or a paragraph
- 00:10:21you know what is the type of all the
- 00:10:23collections of all the people
- 00:10:25the marks of all the people the cgpa
- 00:10:27going to be decimal numbers
- 00:10:29some cgpa 9.5 9.2 9.1 8.7 whatever
- 00:10:34now you might be asking another question
- 00:10:36hey create a collection of data of all
- 00:10:39the students
- 00:10:40where each student has let's say three
- 00:10:43properties
- 00:10:44name roll number and marks now you get
- 00:10:47confused
- 00:10:48okay what is the data type of this going
- 00:10:50to be now what is the data of each
- 00:10:52student going to be of which type
- 00:10:53is it going to be string because we are
- 00:10:55containing names is it going to be the
- 00:10:57integer because we are storing the
- 00:10:58integer like the roll number
- 00:11:00is it going to be decimal point because
- 00:11:02we are storing the marks
- 00:11:04we are storing all of these different
- 00:11:06types of data types
- 00:11:07so what is one single data type that can
- 00:11:09be of a student
- 00:11:11it can be a custom data type which we
- 00:11:13can
- 00:11:14specify using classes do not worry about
- 00:11:17what
- 00:11:17if you don't know what classes are
- 00:11:19classes in simple terms is this only
- 00:11:22named group of properties and functions
- 00:11:25someone is saying create a separate data
- 00:11:29type like a type of data for student
- 00:11:31you're like okay this is neither an
- 00:11:33integer
- 00:11:34nor a string or alphabets nor a decimal
- 00:11:37because it is collection of all
- 00:11:38this collection of all is called a class
- 00:11:42okay so and an instance of this class is
- 00:11:46called an object
- 00:11:47so for example i am of class human
- 00:11:50we all are of class human but i am an
- 00:11:54object of class human i'm a running i'm
- 00:11:56an instance of that class
- 00:11:57a class is like a template a property we
- 00:12:00all know humans have a few properties
- 00:12:02two eyes one nose one mouth two ears two
- 00:12:05hands two legs
- 00:12:06this is a property a template using this
- 00:12:09template god has created many objects
- 00:12:11we we are actually objects we are
- 00:12:13actually the
- 00:12:14the memory inside your ram you know when
- 00:12:17you say a is equal to 10
- 00:12:19a is actually the variable 10 is
- 00:12:21actually the object that is the thing
- 00:12:23that is actually in the memory
- 00:12:25we'll talk more about that later do not
- 00:12:26worry but i hope you are able to
- 00:12:28understand the difference between
- 00:12:29classes and object we'll cover that
- 00:12:31later on classes
- 00:12:32objective programming is a separate
- 00:12:33section but in order to make you
- 00:12:35understand what object-oriented
- 00:12:36programming
- 00:12:36you know is in type of languages it's
- 00:12:40basically
- 00:12:41dividing our code into various chunks so
- 00:12:44that it makes it easy for us to develop
- 00:12:46debug reuse and maintain the software
- 00:12:49for example if you want to create a
- 00:12:50function or sorry not a function a
- 00:12:52program a program
- 00:12:53computer program that has information
- 00:12:56about your car
- 00:12:57it can have many information what is the
- 00:12:59color how what what is the type of the
- 00:13:01car
- 00:13:01supercar or what is the you know how
- 00:13:03many engine does it has
- 00:13:05or what is the type of the engine okay
- 00:13:07so many things
- 00:13:08let's say in your program now you want
- 00:13:10to change the type of the engine
- 00:13:12you're saying hey i want to change it
- 00:13:14from diesel to petrol or petrol
- 00:13:16to diesel or from fuel to electrical
- 00:13:20does it really make sense to change the
- 00:13:22entire car when you go to your car
- 00:13:23mechanic
- 00:13:24and you want to get that you know some
- 00:13:26parts changed do they change the entire
- 00:13:28car or just change that particular part
- 00:13:30they change that particular part if we
- 00:13:32divide the entire
- 00:13:34program also in these parts engine has
- 00:13:36an
- 00:13:37a separate code base steering wheel has
- 00:13:39a separate code base
- 00:13:41you know other properties have separate
- 00:13:43code bases if you want to make a change
- 00:13:44in that entire program just change that
- 00:13:46simple
- 00:13:47part of the program that is what i mean
- 00:13:50by like object-oriented simple terms so
- 00:13:51i'm
- 00:13:52trying to explain it as simple as you
- 00:13:53can as i can do not
- 00:13:55worry about how these things are working
- 00:13:57do not worry about it ignore it
- 00:13:59because it will be covered later on in
- 00:14:00detail ignore what is happening
- 00:14:02just understand what these things are
- 00:14:04ignore how it's happening
- 00:14:06okay now java supports object-oriented
- 00:14:10principles
- 00:14:11okay we can create objects and like
- 00:14:13classes and all these nice nice
- 00:14:14structures that i told you about like
- 00:14:16entire student structure or whatever
- 00:14:18python also supports this
- 00:14:19c plus also supports this i might be
- 00:14:21asking hey kunal
- 00:14:23you're saying java supports both
- 00:14:25procedural and object oriented
- 00:14:26python supports all the three c plus
- 00:14:29plus also supports object-oriented and
- 00:14:30procedural
- 00:14:32are these languages all the types of
- 00:14:34languages the correct answer is yes like
- 00:14:38a particular language if it's object
- 00:14:40oriented it does not mean
- 00:14:42that it will not follow procedural you
- 00:14:44know fundamentals
- 00:14:45procedural rules or functional rules
- 00:14:48java for example follows object oriented
- 00:14:50and procedural
- 00:14:50c we have that follows procedural c plus
- 00:14:53plus we have that follows like you know
- 00:14:55procedural we can also do like some
- 00:14:56functional programming that was as well
- 00:14:58it also follows objective programming
- 00:15:00python you know follows procedural
- 00:15:02functional object oriented so this idea
- 00:15:05that one particular language can only be
- 00:15:06of one type that is not correct
- 00:15:08okay that is not correct it's like
- 00:15:12hybrid sort of like structure follow
- 00:15:14many many other theories
- 00:15:16and that's basically about the types of
- 00:15:17languages we are learning java so we'll
- 00:15:19be doing heavily focused on
- 00:15:21object-oriented principles
- 00:15:22this is also very very important for
- 00:15:24your you know interviews and stuff
- 00:15:25object-oriented we will do in very
- 00:15:26detail
- 00:15:27and so many properties inheritance
- 00:15:28polymorphism abstraction
- 00:15:30encapsulation everything will be done in
- 00:15:32detail do not worry about it
- 00:15:34that was a basic understanding of this
- 00:15:35thing let's move forward
- 00:15:39another types that you might encounter
- 00:15:41are known as
- 00:15:42static versus dynamic languages let's
- 00:15:45look into what is static and dynamic
- 00:15:46language
- 00:15:47let me create a yeah okay
- 00:15:51let me just
- 00:16:00write this thing over here so you are
- 00:16:01able to see i think we all can see this
- 00:16:04now
- 00:16:06cool
- 00:16:16okay just looks good
- 00:16:20so speaking of static versus dynamic
- 00:16:22languages this is based on
- 00:16:23that was based on like the mem like the
- 00:16:25the previous three
- 00:16:26points that we had were like structure
- 00:16:28of the you know how we write code and
- 00:16:30how things are structured and everything
- 00:16:32what are static versus dynamic languages
- 00:16:36static languages before moving forward
- 00:16:37to that we gave the student example
- 00:16:40right
- 00:16:40so i can say i have something like name
- 00:16:42is equal to kunal
- 00:16:44something like this okay now here you
- 00:16:48can see when i write name is equal to
- 00:16:49kunal
- 00:16:50the name the type of this variable that
- 00:16:53we have over here is
- 00:16:54string like letters and alphabets right
- 00:16:58if i say something like roll number is
- 00:17:00equal to
- 00:17:0156 this is of type integer
- 00:17:05okay if i write something like marks is
- 00:17:07equal to
- 00:17:0993.6 this is of type decimal or float
- 00:17:14now there are two ways to approach this
- 00:17:16problem like the problem is that how do
- 00:17:18we know which type how does the
- 00:17:19programming language know
- 00:17:21what is the type of these variables okay
- 00:17:24how does the programming language know
- 00:17:25that
- 00:17:26so the basic idea over here is that
- 00:17:30there are two ways to do this one is the
- 00:17:32static and one is the dynamic
- 00:17:34what is static type checking is you know
- 00:17:37performing the type checking it does the
- 00:17:39type checking at compile time
- 00:17:41so what do i mean by compile time
- 00:17:42remember when i mentioned that
- 00:17:44we write the program in programming
- 00:17:46languages and computer will you know
- 00:17:48compile that and or interpret that in
- 00:17:49whatever sense and
- 00:17:50convert it into the machine readable
- 00:17:52format like zeros and ones or whatever
- 00:17:54assembly or whatever so that the
- 00:17:56computer can understand this
- 00:17:57this conversion is known as compilation
- 00:18:00your source code the code that you will
- 00:18:03be writing in java
- 00:18:04or c plus plus or whatever that gets
- 00:18:06convert to machine code that machine can
- 00:18:08read
- 00:18:09and then machine will read that code
- 00:18:10this is known as compilation of your
- 00:18:11program
- 00:18:13so when you're writing a is equal to 10
- 00:18:14for example
- 00:18:16there are two ways to do this when the
- 00:18:18compilation is done
- 00:18:20and when the program is running that
- 00:18:23time
- 00:18:24if the programming language is like okay
- 00:18:26this is integer that is dynamic language
- 00:18:30entire program is run it is being
- 00:18:31converted to machine language
- 00:18:33and now programming language is like
- 00:18:35okay program is running
- 00:18:36the value of a is equal to 10 so a is an
- 00:18:38integer
- 00:18:40program is running the value of a is
- 00:18:42equal to kunal
- 00:18:43so so value of name is equal to kunal
- 00:18:45sorry name is equal to kunal
- 00:18:47so name has a type of let's say string
- 00:18:49or alphabets or letters or whatever
- 00:18:51okay this is known as dynamic language
- 00:18:53where you do not have to worry about
- 00:18:56specifying the type previously so you
- 00:18:59don't have to tell
- 00:19:00the programming language like hey i am
- 00:19:02giving you a variable
- 00:19:03a which is of type integer like int a is
- 00:19:06equal to 10.
- 00:19:08what is happening in this case this is
- 00:19:10statically typed here
- 00:19:12while the program is compiling while
- 00:19:14it's converting your source code the
- 00:19:15code you have written in machine code
- 00:19:18during that conversion time the
- 00:19:20programming language should know what is
- 00:19:21the type of a
- 00:19:24during that time
- 00:19:28so the type checking here it is done at
- 00:19:30compile time
- 00:19:32while the thing is compiling so you can
- 00:19:34see this left hand side thing what is
- 00:19:35happening is compile
- 00:19:37whatever happens here in the right hand
- 00:19:38side of the equal to is runtime
- 00:19:40this is the actual thing that is stored
- 00:19:42in the object and
- 00:19:44this is the actual object that is stored
- 00:19:45in the memory to understand more about
- 00:19:47this in detail watch the next lecture
- 00:19:48i'll cover it in detail
- 00:19:50what are the memories and how the
- 00:19:51reference variables and everything is
- 00:19:52working in the next detail
- 00:19:54for now just imagine that this is a
- 00:19:56variable a it has a type that is equal
- 00:19:58to whatever type it's equal to
- 00:20:00in simple case again do not worry how
- 00:20:02it's working because that is coming in
- 00:20:04the next lecture
- 00:20:05okay so in static type languages if i'm
- 00:20:09saying you have an
- 00:20:09integer a the value is equal to kunal
- 00:20:13is this possible is this kunal thing
- 00:20:16that i have on the right hand side is
- 00:20:18really an integer
- 00:20:19no it's a string it's letters and you
- 00:20:22know characters
- 00:20:23this will give me an error
- 00:20:27error while my program will be compiling
- 00:20:31it will be like hey you mentioned a is
- 00:20:32integer but you're giving string
- 00:20:34error so errors will show at compile
- 00:20:37time
- 00:20:38okay i hope the first point is clear
- 00:20:41type checking at runtime
- 00:20:42and then static type checking at compile
- 00:20:44time what is runtime when the program is
- 00:20:46running after the compilation period
- 00:20:48okay once the program has been converted
- 00:20:50into machine code
- 00:20:51and when that machine code is running
- 00:20:53that's basically when the runtime thing
- 00:20:55is happening
- 00:20:56okay very simple stuff okay when you
- 00:20:58write
- 00:20:59a is equal to 10 okay let's say this is
- 00:21:01dynamic language i'm not specifying a is
- 00:21:03equal to 10
- 00:21:03i'm like when you run this program you
- 00:21:05figure it out yourself that is what i'm
- 00:21:07saying to the language
- 00:21:08so in this case it will be like okay
- 00:21:10when the program is running so when
- 00:21:11first it will compile and then in the
- 00:21:13runtime like if
- 00:21:14i look at the memories and everything 10
- 00:21:16will actually be stored in some memory
- 00:21:17or ram
- 00:21:18a will be pointing to that all these
- 00:21:20things we'll
- 00:21:21look into it in the next lecture but
- 00:21:23here let's say if we do let's look at
- 00:21:25the second point now
- 00:21:26so error will show at compile time or i
- 00:21:29already showed you if i do something
- 00:21:30like
- 00:21:31you know something like string a is
- 00:21:32equal to 10 or not a something like i
- 00:21:35can do
- 00:21:35int a is equal to kunal
- 00:21:39error kunal is not an integer and you
- 00:21:40are specifying it as integer
- 00:21:42error at compile time let's see how we
- 00:21:45can get an error in the dynamic
- 00:21:46languages
- 00:21:47let's say you do a is equal to 10 this
- 00:21:49will work perfectly fine
- 00:21:50this will work perfectly fine you know
- 00:21:52and uh here you may say
- 00:21:55that um another possibility can be
- 00:21:59a is equal to in the next line i can say
- 00:22:01of the code kunal
- 00:22:02first a was integer now a is kunal
- 00:22:06is it going to give an error pause this
- 00:22:08video and think to yourself
- 00:22:10in dynamic languages where type is not
- 00:22:12specified beforehand
- 00:22:13type is only calculated after the you
- 00:22:15know the in the during the run time
- 00:22:17in python for example okay
- 00:22:20if you said yes then that's not correct
- 00:22:24actually it will not give an error okay
- 00:22:26why it will not give an error watch the
- 00:22:27next video
- 00:22:28it's basically an object and references
- 00:22:31thing and it's uh
- 00:22:33actually like first the value was 10 and
- 00:22:36then the value is going to point towards
- 00:22:38kunal string because at the compile time
- 00:22:42it does not really care about the type
- 00:22:43so it can definitely change things like
- 00:22:44that
- 00:22:45okay first a was pointing to 10 then a
- 00:22:48will be pointing to kunal
- 00:22:49then a will be pointing to 13.5 whatever
- 00:22:52now float or decimals you want
- 00:22:54but this will give an error in static
- 00:22:55languages
- 00:22:58here i have specified a is equal to 10
- 00:23:00there is a rule associated to it
- 00:23:02in the next line if i do a is equal to
- 00:23:04kunal
- 00:23:06this will give an error in static
- 00:23:07languages
- 00:23:10okay so when it's compiling it will be
- 00:23:12like hey you said a is equal to 10
- 00:23:14which is an integer but in the next line
- 00:23:16you are assigning it a string
- 00:23:17this is an error you can definitely do
- 00:23:19something like this
- 00:23:20okay so that's like error will show at
- 00:23:23compile time
- 00:23:23error might not show till the program is
- 00:23:25run so in this case it can be something
- 00:23:27like if you do
- 00:23:29you know if you're doing something like
- 00:23:32a plus 10 so you are adding
- 00:23:35a string and a number this will give an
- 00:23:37error
- 00:23:38okay we'll talk more about this later on
- 00:23:43now declaring the data type before you
- 00:23:45use it we already covered this
- 00:23:47in a is equal to 10 like a is type
- 00:23:49integer value is 10
- 00:23:50declaring the data type before we
- 00:23:52actually use it no need to declare the
- 00:23:54data type
- 00:23:56now what are the advantages
- 00:23:57disadvantages more control
- 00:23:59okay you have to write a little bit more
- 00:24:00code but you have more control over the
- 00:24:02you know type data run time errors are
- 00:24:05reduced
- 00:24:06and in dynamic languages no need to
- 00:24:08specify the type or anything so just
- 00:24:10saves time in writing code but it might
- 00:24:12give error at
- 00:24:14runtime that was pretty much about it
- 00:24:16and we'll cover
- 00:24:17more about the memory management and all
- 00:24:20these things in the next video
- 00:24:21now let's answer a few questions that
- 00:24:24you might be having right you might not
- 00:24:25know what are variables you might not
- 00:24:27know
- 00:24:27how the objects are working internally
- 00:24:29what all this memory thing that i'm
- 00:24:30talking about
- 00:24:32so let's answer that let's take the very
- 00:24:33very simple stuff like the very simple
- 00:24:35stuff
- 00:24:36if you write in a programming language
- 00:24:38something like a is equal to
- 00:24:4010 as simple as it gets i'm just writing
- 00:24:43a is equal to 10 over here
- 00:24:45let's dive deep into how this thing is
- 00:24:47working
- 00:24:48so when you're talking about memory
- 00:24:50management right
- 00:24:52there are two types of memories here in
- 00:24:54your computer you know programming
- 00:24:56languages
- 00:24:57one is the stack memory
- 00:25:01one is the heap memory okay
- 00:25:04so this is the stack memory and this is
- 00:25:08the
- 00:25:09heap memory and when you write in your
- 00:25:11programming language when you write
- 00:25:13something like this
- 00:25:14a is equal to 10 when you write
- 00:25:16something like this
- 00:25:18this a is known as what reference
- 00:25:20variable
- 00:25:25and this 10 is known as what object
- 00:25:29a is not the object many people say is
- 00:25:30the object no a is the reference
- 00:25:32variable 10 is the object
- 00:25:35how is this stored in memory then your
- 00:25:37variables and function calls and
- 00:25:39whatever
- 00:25:39like for now let's just say variables
- 00:25:42they are stored in the stack
- 00:25:43and the actual object that is in the
- 00:25:45memory like the actual value of that
- 00:25:47object
- 00:25:48that is stored in heap
- 00:25:52in this memory let's say in its ram or
- 00:25:54whatever and a
- 00:25:56is going to be pointing towards that
- 00:25:57object
- 00:26:00so when you're saying hey give me the
- 00:26:02value of a
- 00:26:03it's going to say it's 10 how it's going
- 00:26:05to see a is here
- 00:26:07what is a pointing towards a is pointing
- 00:26:09to
- 00:26:1010 this a is going to point to the
- 00:26:12address of this particular thing
- 00:26:14you know every object and stuff has an
- 00:26:16address in the memory like some
- 00:26:18some address in some ram or whatever
- 00:26:20very nice computer science is very
- 00:26:21fascinating
- 00:26:22in simple terms this is how it works so
- 00:26:24you have a is equal to 10
- 00:26:26a is a variable in stack memory pointing
- 00:26:28towards the
- 00:26:29object in heap memory the stack and heap
- 00:26:31and everything is just memory management
- 00:26:33how they are done in
- 00:26:34like computer like scientists and stuff
- 00:26:35they have computer scientists they have
- 00:26:37you know made these things like there's
- 00:26:38a stack memory
- 00:26:39heap memory this thing will be much more
- 00:26:41clear when we'll be doing like recursion
- 00:26:42and stuff
- 00:26:43for now this is as simple as it gets
- 00:26:45it's not like a separate hardware piece
- 00:26:47in your pc okay it's just how memory is
- 00:26:49managed it's how memory is managed
- 00:26:52so a is in the stack memory pointing
- 00:26:55towards the heap memory
- 00:26:56heap is let's say another section of
- 00:26:57your memory or ram or whatever hard disk
- 00:26:59and there's a heap memory allocation
- 00:27:01over there in your you know
- 00:27:03it sometimes there's also like some if
- 00:27:04you talk about cpus they also have some
- 00:27:06memories they have registers and stuff
- 00:27:08but we don't have to go
- 00:27:09in too much detail simple terms
- 00:27:11variables in stack memory
- 00:27:12pointing towards the object in heap
- 00:27:14memory that is simple but that is not
- 00:27:16what i am trying to make you understand
- 00:27:17here
- 00:27:18i am trying to make you understand how
- 00:27:19these things are working and how this is
- 00:27:21going to help us
- 00:27:23what is the actual meaning of object
- 00:27:25what is the actual meaning of reference
- 00:27:26variable let's look into that
- 00:27:28this is the best example and it will
- 00:27:29make things very very clear
- 00:27:33so now we are answering the very
- 00:27:34important question he the
- 00:27:36object and memory and reference variable
- 00:27:38all these things
- 00:27:40previously i mentioned that i am an
- 00:27:42object for by far you should know that
- 00:27:44the reference variable is just like the
- 00:27:45variable
- 00:27:46and the actual value of that variable is
- 00:27:48in the object i'll repeat it again
- 00:27:50variable does not a is not the actual
- 00:27:52value of 10
- 00:27:53in a is equal to 10 10 is actually in
- 00:27:56the memory in the heap memory a is just
- 00:27:57pointing towards that
- 00:27:59for example i am kunal my object is my
- 00:28:02body
- 00:28:03this is a physical object in the memory
- 00:28:05of this of this world
- 00:28:06this is this is the object kunal
- 00:28:10object when i'm saying name is equal to
- 00:28:14kunal
- 00:28:17okay so this object kunal this is a
- 00:28:19object on an actual object
- 00:28:21you might i might ask you hey what is
- 00:28:23the type of this object kunal
- 00:28:25human we are all of class human
- 00:28:29so objects have a type and we can define
- 00:28:32those via classes
- 00:28:33we'll look more into that later on so
- 00:28:35this is the object in the memory in the
- 00:28:37heap memory okay this is in the heap
- 00:28:38memory the object
- 00:28:40if you want to call this object if you
- 00:28:41want to call my myself my my
- 00:28:44physical self how do you call me you
- 00:28:47call me via my name
- 00:28:48so you can say kunal this is the
- 00:28:51reference variable
- 00:28:52pointing to this object so if kunal is
- 00:28:55giving a party
- 00:28:56okay so we'll just say kunal pay the
- 00:28:58bill
- 00:28:59kunal will pay the pill and this objects
- 00:29:01bill account will be reduced like
- 00:29:03this objects money will be spent let's
- 00:29:06say my mom
- 00:29:07also calls me something she does not
- 00:29:09call me kunal she calls me
- 00:29:10son son
- 00:29:14is also the same person if you are
- 00:29:17calling me you will call me kunal
- 00:29:19if my call if my mom let's say only my
- 00:29:20mom if let's say my mom calls me kunal
- 00:29:23same person is being called if my mom
- 00:29:26calls me son
- 00:29:27same person is being called if my sister
- 00:29:29calls me brother
- 00:29:32same person is being called so if kunal
- 00:29:36is giving a party
- 00:29:37or son is giving a party or brother is
- 00:29:39giving a party
- 00:29:40let's say in a hypothetical world i
- 00:29:42might have a girlfriend might call me
- 00:29:43baby
- 00:29:45if baby is giving a party money is being
- 00:29:48spent of the original object only just
- 00:29:50one object
- 00:29:51it's not like there are four canals for
- 00:29:53these four people
- 00:29:55what am i trying to make you understand
- 00:29:57with this if you write something like a
- 00:29:59is equal to 10
- 00:30:01b is equal to 37.5 or whatever you buy
- 00:30:04now you know these are objects
- 00:30:05these are reference variables these are
- 00:30:07in heap memory these are the actual
- 00:30:09objects
- 00:30:09and these are in the stack memory that
- 00:30:11are just pointing towards these objects
- 00:30:13what am i trying to make you understand
- 00:30:14with this example then the thing i'm
- 00:30:16trying to make you understand
- 00:30:18is one object
- 00:30:22or more than one this is what i'm trying
- 00:30:24to make you understand
- 00:30:25listen very carefully more than one
- 00:30:27reference variables
- 00:30:29can point to the same object point
- 00:30:31number one
- 00:30:32pointer number two if any one of these
- 00:30:35reference variables change the object
- 00:30:38original object is going to be changed
- 00:30:40and it is going to be changed for all
- 00:30:45if sun gets a haircut then if br
- 00:30:49if if if uh if son gets the haircut
- 00:30:52then baby also gets the haircut right
- 00:30:54okay if if my mom told me to get a
- 00:30:56haircut
- 00:30:56it's not like my sister will not see
- 00:30:58that haircut even though the change was
- 00:31:01made
- 00:31:01via this reference variable original
- 00:31:04object was changed
- 00:31:06and since all of these other variables
- 00:31:08are also pointing towards the original
- 00:31:10object
- 00:31:10the change is going to be visible to all
- 00:31:13these variables
- 00:31:16this is how it sort of like functions in
- 00:31:18like java and python as well
- 00:31:20so in the future we will be looking into
- 00:31:22like some concepts like pass by
- 00:31:24reference pass by
- 00:31:25value you know might have heard in c
- 00:31:27plus java does not have this thing
- 00:31:30it only has pass by objects value sorry
- 00:31:32not objects value
- 00:31:33pass by reference value okay it does not
- 00:31:36have like value or anything
- 00:31:38pass by reference value that it's there
- 00:31:40in java only we'll talk more about that
- 00:31:42later
- 00:31:42okay how these things are internally
- 00:31:44working but what it's doing are you able
- 00:31:46to understand
- 00:31:47if i'm saying there's a list something
- 00:31:48like this let's say let's say simple
- 00:31:50python example
- 00:31:51let's say i say a is equal to a list
- 00:31:53which is like 1
- 00:31:543 5 9 or whatever and then i say
- 00:31:57b is equal to a what is happening
- 00:32:00internally
- 00:32:02this is happening internally list is
- 00:32:04nothing but a collection of
- 00:32:05uh numbers or you know elements you can
- 00:32:08you might have
- 00:32:09also heard it like in areas or whatever
- 00:32:11okay let's say this is array forget
- 00:32:12about programming language let's say
- 00:32:13this is an array
- 00:32:14in you know java or python so actually
- 00:32:17internally all of you know this is in
- 00:32:19stack memory pointing towards this
- 00:32:21which is 1 3 5 9
- 00:32:24b is pointing to a means whatever a is
- 00:32:27pointing to b will also point to that
- 00:32:29very simple stuff now if you make a
- 00:32:32change via a if you say the 0th element
- 00:32:34of whatever a is pointing to
- 00:32:36should be 99 this will be changed to 99
- 00:32:40very simple stuff
- 00:32:41now when you display output
- 00:32:45b my question to you is
- 00:32:48is b also going to show this updated 99
- 00:32:51or is it going to show the original one
- 00:32:54pause for a minute and think about it
- 00:32:56if you said that it will also update 99
- 00:32:58that is true because the answer is in
- 00:32:59front of your eyes
- 00:33:01b is also pointing to the same object so
- 00:33:04if this
- 00:33:05simple terms are repeated again if the
- 00:33:08object was changed via one reference
- 00:33:10variable
- 00:33:12then this change will also be visible
- 00:33:15to all the other reference variables
- 00:33:17that are pointing to the same object
- 00:33:20okay there are more things we'll
- 00:33:22consider mutability immutability later
- 00:33:24on
- 00:33:25but this is just like a simple example
- 00:33:26that i'm giving you
- 00:33:28okay don't worry we'll we'll cover
- 00:33:31mutability like how we can modify and
- 00:33:33all these things
- 00:33:34objects and sometimes it may show
- 00:33:35sometimes we may not show but this is
- 00:33:36the
- 00:33:38theory i wanted to show you i noticed
- 00:33:41you were not able to see but i
- 00:33:42i just wrote output b only okay that's
- 00:33:44it output b was only thing written you
- 00:33:46did not
- 00:33:46miss out on anything one more thing i
- 00:33:49want to share with you
- 00:33:50it's another important thing which is
- 00:33:52what happens when there is no reference
- 00:33:54variable to the object
- 00:33:56say it's my name is kunal
- 00:34:01reference variable to something this is
- 00:34:04my body
- 00:34:05okay my object now someone calls me baby
- 00:34:10same object let's say a third person
- 00:34:13came
- 00:34:13let's say um
- 00:34:17i don't know um
- 00:34:21this is a hypothetical situation by the
- 00:34:22way trying to make you understand so
- 00:34:24you know i can either be called kunal or
- 00:34:26baby so if you call me
- 00:34:27by canal or she calls me by a baby same
- 00:34:29person is being called
- 00:34:31okay let's say there comes another
- 00:34:33person
- 00:34:35and let's say this person's name is
- 00:34:38another object so this name is adam
- 00:34:40levine or whatever
- 00:34:43adam levine is married let's take some
- 00:34:46other example
- 00:34:47who is a popular celebrity who is not
- 00:34:49married
- 00:34:50um or i can just take some random name
- 00:34:55uh random name okay alex or alex or
- 00:35:00alex zan alexander
- 00:35:03or something okay this new guy comes
- 00:35:06and now let's say baby now points
- 00:35:09towards alexander
- 00:35:11okay let's say kunal is not the baby
- 00:35:13anymore okay so if alexander is called
- 00:35:15the same person will be called now baby
- 00:35:17will be called
- 00:35:18all the changes made by a baby variable
- 00:35:20will be in this object now
- 00:35:22okay let's say kunal now gets upset
- 00:35:25like i'm not the baby anymore okay so
- 00:35:28what happens to kunal is that
- 00:35:30kunal goes into the forest and like
- 00:35:32leaves the material world and everything
- 00:35:34and gives up his name okay so now there
- 00:35:37is no more name kunal even
- 00:35:39there is no name of this person now this
- 00:35:41person is living alone in the forest
- 00:35:43okay so when this is an object what is
- 00:35:47happening
- 00:35:47this is an object with
- 00:35:51no reference variable
- 00:35:55there is no reference variable to this
- 00:35:57object meaning there is no variable that
- 00:35:59is pointing towards this object
- 00:36:02so this will be removed from the memory
- 00:36:05when garbage collection hits so in java
- 00:36:08there is something known as garbage
- 00:36:10collection
- 00:36:10in very simple terms what is garbage
- 00:36:12collection very simple terms
- 00:36:14garbage collection means that objects
- 00:36:16that do not have a reference variable
- 00:36:18pointing towards them like this example
- 00:36:20no one is pointing to this object when
- 00:36:22the garbage collection hits it
- 00:36:24it is it hits automatically okay when it
- 00:36:26feels like it needs to free the memory
- 00:36:28in that case all the all the objects
- 00:36:30that do not have a variable pointing to
- 00:36:32them
- 00:36:32they will be removed from the memory
- 00:36:34deleted that happens automatically
- 00:36:36we'll we'll look more into that later on
- 00:36:38how we can you know perform
- 00:36:40some functions when garbage collection
- 00:36:41is hit in object 20 programming we look
- 00:36:43into later on there's a finalize final
- 00:36:44finalize on whatever
- 00:36:46okay so if you're doing something like a
- 00:36:48is equal to 10
- 00:36:50so this basically means uh a is pointing
- 00:36:52to an object 10
- 00:36:54then you say a is equal to 37 now a will
- 00:36:57be pointing towards 37
- 00:37:02okay what happens to this 10 no one is
- 00:37:05pointing to 10
- 00:37:06garbage collection will come and remove
- 00:37:08it yam raj
- 00:37:10if you can get that reference okay
- 00:37:14one last thing i wanted to share was in
- 00:37:15like uh previous example i mentioned
- 00:37:17something regarding
- 00:37:19the dynamically type languages
- 00:37:22so why is this thing working so if i say
- 00:37:25something in dynamic type language that
- 00:37:26in python for example if i say a is
- 00:37:29equal to 10
- 00:37:30then i say a is equal to kunal this will
- 00:37:33not give an error
- 00:37:34in dynamic languages where the type is
- 00:37:37decided
- 00:37:38compile at runtime hours this is working
- 00:37:40internally
- 00:37:42now you might be knowing a is pointing
- 00:37:44towards 10
- 00:37:45a is equal to kunal now another object
- 00:37:47will be formed kunal
- 00:37:52a will be now pointing to this this will
- 00:37:55be
- 00:37:56removed when garbage collection hits
- 00:37:57that's how python works
- 00:37:59very simple stuff that's the entire idea
- 00:38:01of objects and you know things and we'll
- 00:38:02go more into details of this when we're
- 00:38:04learning about classes objective and
- 00:38:06programming but this is the general idea
- 00:38:08of memory management
- 00:38:09some simple simple data types we look
- 00:38:10into next lecture is like the integer
- 00:38:12and like character and like booleans
- 00:38:14very simple stuff like int a is equal to
- 00:38:1610
- 00:38:17just created an integer a value 10 this
- 00:38:19is the object this is a reference
- 00:38:20variable this is in stack this is in
- 00:38:22heap
- 00:38:22this is pointing to this that's it if
- 00:38:24you did if you say something like
- 00:38:25output the value of a it will actually
- 00:38:27see where it's pointing and get that
- 00:38:29value and print this for us
- 00:38:31if you say a plus b what is equal to c
- 00:38:33is equal to a plus b
- 00:38:34this will get the value from heap this
- 00:38:35will get the value from heap combine it
- 00:38:37and
- 00:38:38add a value in another another variable
- 00:38:40this also
- 00:38:41will be in heap all the objects are in
- 00:38:43heap nothing to think about here
- 00:38:45very simple stuff all right thanks a lot
- 00:38:48for watching and
- 00:38:49we will see you in the next video make
- 00:38:50sure you like share and subscribe and
- 00:38:52check out the links in the description
- 00:38:54as well
- 00:39:00[Music]
- programming languages
- procedural
- functional
- object-oriented
- static languages
- dynamic languages
- memory management
- garbage collection
- functions
- coding principles