UnityScript与Javascript [英] UnityScript vs Javascript

查看:117
本文介绍了UnityScript与Javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道语言之间存在差异,例如类等。

I know there's a difference between the languages, such as classes etc.

我想知道的是:如果UnityScript与Javascript不同,为什么Unity3D文档当你仔细观察它时,你可以选择在C#和JS之间进行选择吗?它不应该是C#和US之间的选择吗?

What I wonder is this: If UnityScript is different from Javascript, why does the Unity3D documentation give you the options to pick between C# and JS when you look through it? Shouldn't it be a choice between C# and US?

同时,在Stack Overflow上,人们通常会努力纠正称之为Javascript的人。为什么会这样?

Meanwhile, here on Stack Overflow, people generally make the effort to correct people who call it Javascript. Why is that?

推荐答案

Unity使用一种自定义的JavaScript变体,也称为UnityScript,它在历史上和今天仍然普遍存在(但不一致)指的是JavaScript,包括你在自己的脚本文档中注意到的。

Unity uses a custom JavaScript variant also known as UnityScript which it historically and still today commonly (but inconsistently) refers to as "JavaScript," including as you note in its own script documentation.

这在编程世界中术语JavaScript的含义方面是不正确的在整个(即Unity社区之外)。 UnityScript肯定是不是 JavaScript。它们是不兼容的语言,具有根本差异。从严格的正确性角度来看,是的,Unity 在其文档中使用UnityScript。

This is incorrect in terms of the meaning of the term "JavaScript" in the programming world at large (i.e. beyond the Unity community). UnityScript is definitely not JavaScript. They are incompatible languages with fundamental differences. From a strict correctness point of view, yes, Unity should use "UnityScript" in its documentation.

不正确的用法不倾向于在Unity社区中存在问题,其中假定JavaScript表示Unity使用的JavaScript。事实上,使用术语UnityScript可能会导致Unity社区内部出现混淆,因为JavaScript这个术语在历史上一直并且继续被更常用,并且Unity社区中的许多非程序员都可能不会甚至意识到Unity实际上使用的是变体JavaScript,而不是实际的JavaScript。

The incorrect usage doesn't tend to be problem within the Unity community, within which it is assumed that "JavaScript" means the JavaScript used by Unity. In fact, it's possible that using the term "UnityScript" could cause confusion within the Unity community, because the term "JavaScript" has historically been and continues to be more commonly used, and it's possible many non-programmers within the Unity community don't even realize Unity is actually using a variant JavaScript, as opposed to actual JavaScript.

但是,在Unity社区之外,包括Stack Overflow,使用术语JavaScript来表示除实际JavaScript之外的任何内容都会引起混淆,这就是为什么在这里说UnityScript很重要。

However, outside of the Unity community, including here on Stack Overflow, using the term "JavaScript" to mean anything other than the actual JavaScript will cause confusion, which is why it's important to say "UnityScript" here.

顺便提一下,Unity在Unity社区内外都存在潜在的混淆,不一致。在其版本5的发行说明中,它使用了JavaScript和UnityScript 可以互换。在关于重要脚本更改的博客文章,它使用术语UnityScript-aka-Javascript。

Incidentally, Unity adds to the potential confusion, both within and without the Unity community, by not being consistent. In its release notes for version 5, it used both "JavaScript" and "UnityScript" interchangeably. In a blog entry about an important scripting change, it used the term "UnityScript-aka-Javascript."

这篇关于UnityScript与Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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