DEV Community

keepoSteepo
keepoSteepo

Posted on

 

Types versus Instances, Methods versus Properties

Some of the differences between a method and a property are that a method is a function that has been defined as a part of a type and a property is the one or more pieces of associated information in an instance. A property provides a way to get or set a value for an instance. A method provides behavior specific to that instance.

The difference between a type and an instance is that types are classifications for literals, such as String, Int or Bool while instances are the specific values given to those types at any given moment.

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git