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

How does Brainfuck compare to Rust?


It's way more portable: You can run Brainfuck on an old HP calculator, where Rust would be too bloated: https://forum.swissmicros.com/viewtopic.php?f=23&t=1903&p=83...


The original BF implementation used a fixed-size memory of 30,000 cells and out-of-bound pointers weren't checked, making it highly unsafe. Most modern implementations support dynamically sized memory or at least bound checks though, so they are as safe as Rust.


I use a variant of BF for linear genetic programming experiments that wraps the memory pointer around when it hits the edges. This increases the chances of finding viable candidates by reducing the impact of bad mutations.


The conversation involving "most modern BF implementations" is always a great one.


The syntax of BF is far simpler, so it should be easier to get started than rust.




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

Search: