Language Charts

Main features comparison

Dynamic

String

ruby python typescript javascript lua

immutable

*

unicode

utf8

PEP 393

UTF-16

UTF-16

Bytes

per string encoding

*: Ruby has symbol and frozen string, but string are mutable by default

Static

String

c++ rust zig go java

immutable

✅ (&str)

✅ ([]const u8)

unicode

Bytes

utf8

Bytes

utf8

UTF-16

per string encoding

~

~

~

~

~

~: It can only be achieved by Convention.

Written on February 20, 2026, Last update on
lang c++ rust zig go java ruby python typescript js lua string