开发者

Integrating language features into other languages

When designing or looking at a new language, wha开发者_运维技巧t are the limits of features that exist in other languages? For example, if I made a new language and decided that I really liked C#'s partial classes, is it OK for me to just rip it straight off?


You have to consider what these features are used for, and how they overlap with other features.

Similarly, there may be actual technical barriers with certain features. For example, you might want automatic type inference, but a given feature might make this undecidable.

So for the most part, you can just do whatever you want, but it's worth thinking about how they will be used. Maybe try writing some programs in the language that make use of all the features and see if they can be implemented in terms of one another and if they work together correctly.

I wrote a blog post a while ago about some considerations for language design that might be useful:

http://www.plsadventures.com/2009/09/why-programming-language-design-is-hard.html

If you were talking about from a legal perspective, then yes, it's probably fine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜