当前位置: X-MOL 学术Softw. Pract. Exp. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Unit of measurement libraries, their popularity and suitability
Software: Practice and Experience ( IF 3.5 ) Pub Date : 2020-11-11 , DOI: 10.1002/spe.2926
Steve McKeever 1 , Oscar Bennich‐Björkman 1 , Omar‐Alfred Salah 1
Affiliation  

In scientific applications, physical quantities, and units of measurement are used regularly. If the inherent incompatibility between these units is not handled properly it can lead to potentially catastrophic problems. Although the risk of a miscalculation is high and the cost equally so, almost none of the major programming languages has support for physical quantities. We employed a systematic approach to examine and analyse available units of measurement (UoM) libraries. The search results were condensed into 38 libraries. These were the most comprehensive and well‐developed, open‐source libraries, chosen from approximately 3700 search results across seven repository hosting sites. Most libraries are implemented in a similar manner, but with varying features and evaluation strategies. Three developers and a scientist were interviewed and 91 practitioners of varying experiences from on‐line forums were surveyed to explain their impressions of UoM libraries and their suitability. Our findings show several reasons for nonadoption, including insufficient awareness of UoM libraries, cumbersome in practice, specific performance concerns, and usage of development processes that exclude unit information We conclude with recommendations to UoM library creators derived from these observations. We also argue that so long as units are not part of the language, or not supported through an IDE extension, their use will be limited. Native language support allows for efficient unit conversion and static checking. While lightweight methods provide many benefits of UoM libraries with minimal overheads. Libraries are perhaps best suited to applications in which unit of measurement checking is desirable at run‐time.

中文翻译:

度量库的单位,其受欢迎程度和适用性

在科学应用中,经常使用物理量和度量单位。如果这些单元之间固有的不兼容问题处理不当,则可能导致潜在的灾难性问题。尽管计算错误的风险很高,成本也同样如此,但是几乎没有一种主要的编程语言支持物理量。我们采用了系统的方法来检查和分析可用的计量单位(UoM)库。搜索结果被压缩到38个库中。这些是最全面,开发最完善的开源库,是从七个存储库托管站点的大约3700个搜索结果中选择的。大多数库以类似的方式实现,但是具有不同的功能和评估策略。采访了三位开发人员和一位科学家,并对91位来自在线论坛的不同经验的从业人员进行了调查,以解释他们对UoM库的印象及其适用性。我们的发现表明了不采用的一些原因,包括对UoM库的认识不足,实践中的麻烦,特定的性能问题以及使用排除单位信息的开发过程。我们最后总结了从这些观察中得出的对UoM库创建者的建议。我们还争辩说,只要单位不是语言的一部分,或者不受IDE扩展的支持,它们的使用将受到限制。母语支持可实现有效的单位转换和静态检查。轻量级方法以最小的开销提供了UoM库的许多好处。
更新日期:2020-11-11
down
wechat
bug