Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

c and c++ are still great choices when you care more about performance than correctness.

a media player doesn't (or shouldn't at least) modify any of my essential data, so the worst it can really do is crash every now and then. for a program like vlc, mild instability is not a bad trade-off if it means less dropped frames on old computers.



I wouldn't agree with that---media players are often fed untrusted content from the Internet, so a security issue in a shared media player API can be critical. See the Android StageFright vulnerability from a few years back.

Writing it in C for a marginal performance gain just isn't worth it.


> a media player doesn't (or shouldn't at least) modify any of my essential data

Ask the Android team about the stagefright exploit.

Media players provide a huge attack surface. They are constantly exposed to untrusted files which are also very enticing for users to open (as opposed to, say, some spreadsheet)

Yes. A media player normally doesn't modify your essential data, but when it's written in an unsafe language, it is very likely to do so one way or another.


I would argue the opposite; a media player is one of those applications where you just need "good enough" performance. Good enough to play 4k/8k/whatever content, without dropping any samples/frames, without causing my fans to spin up. After that point I would much rather have rock solid stability and security than more performance.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: