Ben Chuanlong Du's Blog

It is never too late to learn.

How Much to Push for Functional Programming and Immutability

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Most new programming languages (such as Rust, Go, Kotlin, Scala, etc.) support functional programming style and have clear distinguishment on mutable vs immutable variables. So, is functional programming superior to imperative …

Immutable String vs Mutable String

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

advantage of immutable string:

trivially thread safe
    more secure
        more memory efficient in most use cases.
            cheap substrings (tokenizing and slicing)

however, if one has to create many small string, e …