Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

问一下 2.x 使用 cq 码的问题 #275

Answered by takayama-lily
Arondight asked this question in Q&A
Discussion options

You must be logged in to vote

你列出的CQ码转换的处理都没有问题。

  1. 标记为@deprecated 是不推荐使用的意思,今后应该会保留且不会再更改。
  2. 废弃CQ码是因为原生对象表现力更强,使用方便,更易读(不用套一大堆转义字符)。你觉得麻烦可能是因为从之前过来习惯了。CQ码最初是为了简单表现一个元素(酷Q时代只有一个属性),之后没有进行良好设计一直往里加东西,变得越来越臃肿,可读性也急剧下降,已经与设计初衷相违背,性能下降倒是其次的。所以希望能更多使用原生对象来表现消息元素,与CQ码互转仅作为一种兼容手段。

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
7 replies
@takayama-lily
Comment options

@Arondight
Comment options

@Arondight
Comment options

@takayama-lily
Comment options

@Arondight
Comment options

Answer selected by Arondight
Comment options

You must be logged in to vote
1 reply
@takayama-lily
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants