26

有啥能用的跨语言模型定义导入方案么

 3 years ago
source link: https://www.v2ex.com/t/808031
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  程序员

有啥能用的跨语言模型定义导入方案么

  calmzhu · 10 小时 1 分钟前 · 211 次点击

比如一个简单的用户 User

  • name: string
  • age: int

然后处理的话基本上, 后端 java 定义一遍,前端 ts 定义一遍,go/python 的任务处理里面定义一遍。

基本都是搬砖业务代码。啥改动都得改三遍,吐了。

希望思路:

  • 一个类似 openapi 一样的定义文件。
  • 每个语言一个实现库。用实现库直接远程加载定义文件
  • 在运行时生成对应的 ast 节点。(不是通过模版方式生成代码文件)
  • 支持基础字段就够了。纯数据类。其他逻辑也不用了

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK