我们是否应该直接使用ScalaSignature? [英] Should we use the ScalaSignature directly?

查看:2078
本文介绍了我们是否应该直接使用ScalaSignature?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

该ScalaSignature是一个注释。它包含的元信息。

The ScalaSignature is an annotation. It contains meta informations.

和则提供解析器。但斯卡拉-library.jar 不包含解析器。它看起来像秘密API。

And then parser is provided. but scala-library.jar is not contains the parser. It seem like secret API.

但我用ScalaSignature知道一些库。

But I know a few libraries using ScalaSignature.

顺便说一句,我无法找到ScalaSignature的正式规范。
我担心ScalaSignature的规格可以由斯卡拉版本的变化而变化。
此外,我觉得有使用ScalaSignature因为规范不存在其他一些风险。

By the way, I could not found formal specification of ScalaSignature. I worry that the specification of ScalaSignature may change by a Scala version change. Also I think there are some other risks using ScalaSignature because specification doesn't exists.

此外,Scala2.10将提供一个新的反射API。
我想用ScalaSignature会下降,当2.10发布的原因。

Further, Scala2.10 will provide a new reflection API. I think the reason for using ScalaSignature will decrease, when 2.10 is released.

因此​​,应在使用ScalaSignature?

Thus, should one use the ScalaSignature?

推荐答案

在斯卡拉2.10反射API提供了对Java反射+斯卡拉签名的正式支持的抽象。如果ScalaSignature格式的变化,反射也会随之改变。

Reflection API in Scala 2.10 provides an officially supported abstraction over Java reflection + Scala signatures. If ScalaSignature format changes, reflection will change accordingly.

这篇关于我们是否应该直接使用ScalaSignature?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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