Angular 2+源代码中的ɵ(类似Theta)符号 [英] ɵ (Theta-like) symbol in Angular 2+ source code

查看:207
本文介绍了Angular 2+源代码中的ɵ(类似Theta)符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

深入研究Angular 4.3.*源代码后,我经常碰到ɵ符号.例如,在异步中管道源,我们看到了ɵisPromise(_)ɵisObservable(_)函数的用法. 所以现在我想知道为什么Angular团队决定使用它?那是什么意思?

After a deep dive into an Angular 4.3.* source code I was bumping into ɵ symbol quite often. For example, in async pipe source we see the usage of ɵisPromise(_) and ɵisObservable(_) functions. So now I wonder why Angular team decided to use it? And what does it mean?

似乎Angular开发人员用mark标记方法/模块以强调它们是某种内部实体,永远不要导入.但是我没有找到任何权威的证据.

It seems that Angular devs mark methods/modules with ɵ to emphasize they are some kind of inner entities that should never be imported. But I didn`t find any authoritative proofs.

经过更深入的研究,我发现了另一个有趣的事实: ɵ基本上是几个拉丁字母字母表中的字母(根据Wiki被包含在1922年至1933年之间使用的阿塞拜疆字母中),但它类似于希腊文θ(Theta)字母.经过一番谷歌搜索后,我设法找到了角速度计算的数学公式(毕业后被成功遗忘了),其中Theta字母表示角度. 那么也许这是一种幽默吗?

After some deeper research I found another interesting fact: basically ɵ is a letter in several Latin-script alphabets (according to wiki was included into the Azerbaijani alphabet used between 1922 and 1933) but it resembles Greek θ (Theta) letter. After some googling I managed to find a Math formula (successfully forgotten after graduation) of angular velocity calculation, where Theta letter meant angle. So maybe this is a kind of humour?

推荐答案

所以现在我想知道为什么Angular团队决定使用它?那是什么 是什么意思?

So now I wonder why Angular team decided to use it? And what does it mean?

是的,它将方法标记为内部/私有.这是来自由Angular核心团队成员提供以下信息的 Uri Shaked 撰写的文章: /p>

Yes, it marks methods as internal/private. Here is the quote from the article that was written by Uri Shaked who got this information from the Angular core team members:

您首先注意到的第一件事是很多晦涩的方法名称, 以字母ɵ(希腊语Theta)开头,然后是其他3个英语 字母(例如ɵvid). letter字母由Angular团队用于 表示某些方法是框架专用的,不能 由用户直接调用,因为这些方法的API并非 保证在Angular版本之间保持稳定(事实上,我会 说几乎可以保证打破).

The first thing you many notice is a lot of obscure method names, starting with the letter ɵ (Greek Theta) followed by 3 other English letters (e.g. ɵvid). The letter ɵ is used by the Angular team to indicate that some method is private to the framework and must not be called directly by the user, as the API for these method is not guaranteed to stay stable between Angular versions (in fact, I would say it’s almost guaranteed to break).

这篇关于Angular 2+源代码中的ɵ(类似Theta)符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆