Just an idea for the future ECMAScript proposal: UTF8 literal. The literal should have the prefix `u`. For example, `u"Hello!". The literal automatically converted into `bigint`. For example, `u"Hello"` will be converted into 0x1_6F_6C_6C_65_48n. LSB first, the most significant byte is 1 as a terminal symbol. The `===` will work, but ordering (<,>) is not lexicographic. The good thing about this literal is that there is no need to change a JavaScript VM, only its parser. #JavasScript #utf8 #ecmascript
Conversation
Notices
-
Embed this notice
Sergey on FunctionalScript (functionalscript@techhub.social)'s status on Wednesday, 20-Nov-2024 13:05:09 JST Sergey on FunctionalScript -
Embed this notice
Sergey on FunctionalScript (functionalscript@techhub.social)'s status on Wednesday, 20-Nov-2024 13:44:03 JST Sergey on FunctionalScript Or, like this `"Hello!"n`. With the suffix `n`, consistent with `bigint` number literals.
-
Embed this notice