GP said it depends on what the language does with that concept, and then I linked some extra info about what Ada and SPARK do with the concept.
As for whether it's useful ... it's absolutely useful.
Side effects break basic blocks. The smaller the basic blocks, the less optimization can be done.
Side effects also require special handling when using theorem provers. If you can specify that something should be free of side-effects, it's less work to requalify the system after making changes.
The purpose of SPARK is to be formally proven, which is why it implements the feature.
GP said it depends on what the language does with that concept, and then I linked some extra info about what Ada and SPARK do with the concept.
As for whether it's useful ... it's absolutely useful.
Side effects break basic blocks. The smaller the basic blocks, the less optimization can be done.
Side effects also require special handling when using theorem provers. If you can specify that something should be free of side-effects, it's less work to requalify the system after making changes.
The purpose of SPARK is to be formally proven, which is why it implements the feature.