瞎扯淡 M$ 用 Javascript 重寫 Office 365..

ksec · June 13, 2018 · Last by jasl replied at June 17, 2018 · 1997 hits

感覺有點像世界末日..........

(Embedded Twitter 感覺不太好 )...

Write once, debug everywhere.

啧啧啧

原推作者怂了

Hi there, original tweeter here. Just to clarify: no one said when this work would land, simply that we are working on it! Sorry to disappoint XD, but I guess blame the OP.

https://news.ycombinator.com/item?id=17302122

就是想搞个大新闻。

据知乎上的微软党描述 Office 的代码仓库大小超过 1T... 想想重写的酸爽

不过我印象里似乎微软计划让公式支持 JS(貌似 Google 表格是支持的),我好奇 JS 只有单精度浮点以及没有原生的 Decimal 和时间日期相关的类型(外加 JS 没有运算符重载)怎么才能把这事干好...

Reply to martin91

所以我好奇怎么克服这些问题的...

Reply to jasl

早都用 Google Doc 来写文档了。公式图表一点问题都没有的💪

Reply to benzhang

我是说 Google 表格的函数支持 JS 语言来编写,那么怎么解决日期金额之类的数据类型问题。。

windows 自带的 JScript 也可以自动化 Excel, 大概有解决过这些问题...

Reply to jasl

我对 JS 不太熟悉,不过 Date 应该是 JS 原生的。当然针对不同浏览器应该是有点区别。不如你具体说一个你觉得会产生的问题出来大家探讨一下?

Reply to benzhang
  • JS 的浮点类型是单精度的,数值计算很容易溢出
  • 没有原生的 Decimal 类型,不方便进行精确的计算
  • 没有运算符重载,计算的公式的代码不“自然”
  • 类型系统混乱,没有训练容易产生意外的错误
You need to Sign in before reply, if you don't have an account, please Sign up first.