programming languages - Meaning of Leaky Abstraction? -


what term "leaky abstraction" mean? (please explain examples. have hard time grokking mere theory.)

here's meatspace example:

automobiles have abstractions drivers. in purest form, there's steering wheel, accelerator , brake. abstraction hides lot of detail what's under hood: engine, cams, timing belt, spark plugs, radiator, etc.

the neat thing abstraction can replace parts of implementation improved parts without retraining user. let's replace distributor cap electronic ignition, , replace fixed cam variable cam. these changes improve performance user still steers wheel , uses pedals start , stop.

it's quite remarkable... 16 year old or 80 year old can operate complicated piece of machinery without knowing how works inside!

but there leaks. transmission small leak. in automatic transmission can feel car lose power moment switches gears, whereas in cvt feel smooth torque way up.

there bigger leaks, too. if rev engine fast, may damage it. if engine block cold, car may not start or may have poor performance. , if crank radio, headlights, , ac @ same time, you'll see gas mileage go down.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -