Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Types of language and Memory Management

Rating
-
Sold
-
Pages
2
Uploaded on
11-03-2023
Written in
2022/2023

discuss about the types of programming languages along with how memory management works. We cover: - Procedural vs Functional vs Object Oriented Languages - Static vs Dynamic memory allocation - Objects and references

Institution
Course

Content preview

In this note we are learning about types of languages this is important in order to understand
you know when we will be doing like data structures algorithms and even though we 'll be doing
it in java you have to you know have a basic idea about what all these things are and what type
of languages you are working with be that java python or c plus plus. The first one we are going
to look into is called procedural language. procedural language specifies a series of
well-structured steps and procedures to compose a program. The next type of language is the
functional language. The functional language is basically in simple language whenever i say this
thing during the course. Functional programming languages follow first class functions.
Functions are basically just you know block of code that i can reuse again and again many
many simple things you can do in programming languages like a is equal to 10. First class
functions are basically never modify the variables again if you 're not aware of variables do not
worry.

The idea is that code the code file that the code that we have plus the data if you combine these
two together it forms an object. Object-oriented programming it basically revolves around
objects. python is procedural also saying it follows functionals also which one is it wait a minute
let 's look at object oriented. Object-oriented programming divides our code into various chunks
so that it makes it easy for us to develop debug reuse and maintain the software for example if
you want to create a function or sorry not a function a program a program has many information
about your car it can have many information what is the color how what what's the type of the
car supercar. Object-orientated programming is a separate section but we 'll cover that later on.
Java supports object-oriented principles so i'm trying to explain it as simple as you can as i can
do not worry about how these things are working. Java supports both procedural and object
oriented languages. Python also supports this c plus plus also supports object oriented and
procedural languages.

Static versus dynamic languages is based on that was based on like the mem like the previous
three points that we had were like structure of the you know how we write code and how things
are structured and everything. Static type checking is you know performing the type checking it
does the type check at compile time. Dynamic languages do not have to worry about specifying
the type previously so you do n't have to tell the programming language like hey i am giving you
a variable a which is of type integer. What is happening in this case this is statically typed here
while the program is compiling while it 's converting your source code. The programming
language should know what is the type of a during that time so the type checking here it is done
at compile time while the thing is compiling so you can see this left hand side thing what is
happening is compile whatever happens here in the right hand side of the equal to is runtime. In
dynamic languages where type is not specified beforehand type is only calculated after the in
the during the run time in python for example. At compile time errors are reduced and in
dynamic languages no need to specify the type or anything so just saves time in writing code
but it might give error at runtime that was pretty much about it and we 'll cover more about
memory management in the next video.

When you write in a programming language something like a is equal to 10 when you write
something like this a is known as what reference variable and this 10 is what object a is not the
object. The stack and heap and everything is just memory management how they are done in
like computer like scientists and stuff. Variable does not a is not the actual value of 10 in a is
equal to 10 10 is actually in the memory in the heap memory a is just pointing towards that for

Written for

Course

Document information

Uploaded on
March 11, 2023
Number of pages
2
Written in
2022/2023
Type
Class notes
Professor(s)
Kunal
Contains
All classes

Subjects

$10.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
shishpal953

Get to know the seller

Seller avatar
shishpal953
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions