overview icon indicating copy to clipboard operation
overview copied to clipboard

暂不支持unicode identifier的编程语言/环境 汇总

Open 4b5ent1 opened this issue 6 years ago • 15 comments

虽然绝大多数较流行的编程语言已支持Unicode命名(详见在各种编程语言中使用中文命名), 仍有少数还未支持. 汇总如下.

截至2018年11月3日 ~rust~:https://github.com/rust-lang/rust/issues/55467 已支持,见此楼 haxe:https://haxe.org/blog/unicode/

patch 2018.1107: windows DLL:https://github.com/program-in-chinese/overview/issues/74

4b5ent1 avatar Nov 04 '18 18:11 4b5ent1

在顶楼补了一句说明"虽然绝大多数较流行的编程语言已支持Unicode命名...". 各位如对此有兴趣请多关注相关issue进展并更新顶楼.

nobodxbodon avatar Nov 05 '18 18:11 nobodxbodon

hide

4b5ent1 avatar Dec 08 '18 10:12 4b5ent1

p4语言:https://p4.org https://github.com/p4lang 其编译器用c++写的,编译器中使用的字符类型是char,应该不支持统一码标识符。 未测试。

cflw avatar Apr 28 '19 08:04 cflw

一些语言中虽然多数情况下支持中文标识符,但有例外情况:

nobodxbodon avatar Jun 08 '19 05:06 nobodxbodon

dart 不支持 unicede 标识符

https://github.com/dart-lang/sdk/issues/2608

s20208413 avatar Aug 06 '21 17:08 s20208413

另, rust 已经支持 unicode 标识符

https://github.com/rust-lang/rust/issues/55467

s20208413 avatar Aug 06 '21 17:08 s20208413

dart 不支持 unicede 标识符

dart-lang/sdk#2608

注意, 和 dart 密切相关的 flutter 框架

s20208413 avatar Aug 06 '21 17:08 s20208413

GraphQL 不支持 unicode 标识符

https://github.com/graphql/graphql-spec/issues/256

s20208413 avatar Aug 07 '21 01:08 s20208413

群成员指出 gdscript

godot的脚本gdscript也不支持中文。不过可以通过修改源码支持

貌似已有进展:https://github.com/godotengine/godot-proposals/issues/916

然后想起了 Lua,搜了一下邮件列表看到 2019 年的讨论,看来 Lua 作者仍未打算正式支持:Unicode identifier support in 5.4

nobodxbodon avatar Aug 07 '21 03:08 nobodxbodon

@sceext2 多谢,已更新:https://github.com/program-in-chinese/team_website/commit/8d3aa424908f1e3e0b3b8be9ec646ceca3df41f3#diff-d8ff08c5d8970f4072e33dc6b4d2c2e9d3ebd2a1f0e8bfc039091bde0b73715b

nobodxbodon avatar Oct 01 '21 21:10 nobodxbodon

据说即将推出的仓颉语言在第一阶段内测时尚未支持中文命名。

nobodxbodon avatar Jun 25 '22 21:06 nobodxbodon

您好,您的邮件已收到,会尽快处理回复您!

xgongya avatar Jun 25 '22 21:06 xgongya

Ocaml identifiers 只支持 ascii ([_a-zA-Z0-9'])

  • https://v2.ocaml.org/manual/lex.html#sss:lex:identifiers
  • ocaml/ocaml#6692

muzimuzhi avatar Aug 08 '22 12:08 muzimuzhi

您好,您的邮件已收到,会尽快处理回复您!

xgongya avatar Aug 08 '22 12:08 xgongya