Question

https://en.wikipedia.org/wiki/Rule_of_least_power

Does it mean that if you can do an animation with css you should do it with css instead of using javascript. Or if you can do an application in javascript you should do it with javascript instead of other languages like php or java?

Was it helpful?

Solution

Does it mean that if you can do an animation with css you should do it with css instead of using javascript

Pretty much this. Try to drag everything you can away from powerful tools (such as plain code) toward data : declarative languages (html/css), configuration...

Another example is pointer arithmetic. Modern languages avoided its use because it gave too much power (corrupting memory, accessing all the heap and stack) for the use of writing working software.

The drivers behind the rule are maintainance costs, because powerful tools are always more complex and error prone, and security, because reduced power means less ways of evil.

Licensed under: CC-BY-SA with attribution
scroll top