Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

通过非语言特定的编程语言加上中文命名,来推广中文编程 #101

Closed
4b5ent1 opened this issue Nov 2, 2018 · 2 comments
Labels
APL +组合逻辑/tacit族
Milestone

Comments

@4b5ent1
Copy link
Member

4b5ent1 commented Nov 2, 2018

background:前段时间在py教学方面有实践中文命名,后来觉得为了书写方便,自己做了约定了一套notation pyzh/CPN#4

简单说就是将编程语言更加通用化(部分数学化)的同时,通过中文命名,来节省开销。这里前面的语言指自然语言

一楼主要用来更新主要的说明。举例会放到后续楼层。不过为了方便,目前先放一些例子上来。具体个人倾向于用CPN=2,即CPN-1+CPN-2。关于CPN:pyzh/CPN#4

例1:java风格的hello world

^ HelloWorld:  // CPN=2
^$∅ main / args:str[] :
  System`out`println "hello world"
^ 你好呀: //CPN=2+中文命名
^$0 main / 参:str[] : 
  系统`控制台`打印 "你好”

//CPN=2,日常用法,记为PN2 # p=普通的pu

^ 你好呀: 
^$0 main / 参:str[] →
  sys.out.print "你好”  // 变量名保持单音节为主

@4b5ent1 4b5ent1 added 中文化 APL +组合逻辑/tacit族 labels Nov 2, 2018
@4b5ent1 4b5ent1 added this to the 2018戊戌 milestone Nov 2, 2018
@4b5ent1 4b5ent1 changed the title 通过非中文的编程语言加上中文命名,来推广中文编程 通过非语言特定的编程语言加上中文命名,来推广中文编程 Nov 3, 2018
@4b5ent1
Copy link
Member Author

4b5ent1 commented Nov 3, 2018

关于^$0的所谓的可读性问题,如果有比较在意的,可以用一个折中方案,即:vscode做个插件,输入^的时候可以补全pub,$→S , 0→void/无。当然,也可以定义一个宏:PSV→^$0

@4b5ent1
Copy link
Member Author

4b5ent1 commented Nov 30, 2018

这个帖子已经完成了历史任务,可以先archive了

@4b5ent1 4b5ent1 closed this as completed Nov 30, 2018
@4b5ent1 4b5ent1 added this to 搞定/archive in e2018 Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APL +组合逻辑/tacit族
Projects
E2030
Awaiting triage
e2018
  
archive
Development

No branches or pull requests

1 participant