I have posted a couple of minutes ago my first tutorial on Ethereum and Solidity develoment, I would now to explain one thing that, apparently, from what I have read online, many people can't understand, I myself took some time to get the hang of it.
In old versions of Solidity (Ethereum's programming language) you used the keyword constant to indicate that the transaction would not change any state on the network, this means, it wouldn't have to be verified by the network. This meant that the transaction was very cheap to be executed, in comparisson with transactions that required a change of state of a contract or an address.
The keyword constant has been abandoned on solidity 0.4.16 and replaced by the keyword view that represents the exact same thing but has a more intuitive name, so, the view does not write or change anything, but it does read from the network. The other read only keyword is pure, which represents functions that do not write NOR READ from the network.
The pure keyword is the cheapest transaction you can have, even cheaper than the view
Here is an example
pragma solidity ^0.5.0;
contract firstClassContract{
uint private unsignedInteger = 5;
function aPureFunction(uint newVariable) public pure returns(uint) {
return newVariable*2;
}
function aViewFunction(uint newVariable) public view returns (uint){
return unsignedInteger*newVariable;
}
}
And now I am gonna call the aPureFunction with the argumento 5, making it multiply 5 by 2
and then call the aViewFunction with the argument 2, making it multiply 5 by 2 too

I did the same mathematical operation in both two, but look at the price cost difference on them!


The pure function costs almost half of the price of the view function because it does not fetch data from the contract variables