Get the latest tech news

Exploring Polymorphism in C: Lessons from Linux and FFmpeg's Code Design (2019)


Learn how Linux/FFmpeg C partial codebase is organized to be extensible and act as if it were meant to have “polymorphism”. Specifically, we’re going to briefly explore how Linux …

Specifically, we’re going to briefly explore how Linux concept of everything is a file works at the source code level as well as how FFmpeg can add support fast and easy for new formats and codecs. To write useful and long term maintainable software we tend to look out for patterns and group them into abstractions and it seems that’s the case for devs behind Linux and FFmpeg too. Many other languages have somewhat similar mechanisms to dispatch methods or functions as if they were part of an agreed protocol and then the system integration code can deal only with this high-level abstractions.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Linux

Linux

Photo of lessons

lessons

Photo of ffmpeg

ffmpeg

Related news:

News photo

Rewriting essential Linux packages in Rust

News photo

More Apple Silicon Updates For Linux 6.15 Help M1/M2 Plus iPad / iPod / iPhone

News photo

Kagi Is Bringing Orion Web Browser to Linux