gpt4 book ai didi

coding-style - 您见过的相对知名的库中最丑陋的 API 是什么,为什么以及如何改进?

转载 作者:行者123 更新时间:2023-12-04 08:57:05 24 4
gpt4 key购买 nike

关闭。这个问题是opinion-based .它目前不接受答案。












想改善这个问题吗?更新问题,以便可以通过 editing this post 用事实和引文回答问题.

6年前关闭。




Improve this question




我一直在研究 Lucene 2.9 之间的差异,特别是重做的 token 流 API,我突然想到它与旧的相比特别丑陋,如果您重用所述 token ,则只返回一个新的或用值重新填充给定的值。

我没有做任何分析,但似乎使用 MAP 来存储属性效率不高,创建一个新的值类型保存值等会更容易。 TokenStream 和 Attribute 的东西看起来像对象池,这几乎从来没有必要这些天用于简单的值类型,如文本标记。

最佳答案

创造()

When Ken Thompson and Dennis Ritchie received the 1983 Turing Award, after their respective acceptance speeches, someone in the audience asked Ken what he would do differently with Unix if he were to do it all over again. He said, "I'd spell 'creat' with an 'e'."

关于coding-style - 您见过的相对知名的库中最丑陋的 API 是什么,为什么以及如何改进?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1557845/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com