lang-compare icon indicating copy to clipboard operation
lang-compare copied to clipboard

Canonical language

Open sirex opened this issue 8 years ago • 1 comments

Some times it is hard to understand which example of all available languages to follow. Having a canonical language, where all other examples should be based on would help.

So I think, that data/code.yml should have a parameter for each example specifying canonical language. Since programming language have different features, the can't be single canonical language that can cover all cases. So for a specific a canonical language should be one, that have cleanest implementation. For examples like a = 2 + 2, a default canonical language could be used.

As I understand, currently all examples are based on Ruby?

sirex avatar Jun 19 '16 12:06 sirex

Interesting proposal.

At the beginning, there were Ruby (mostly) and CoffeeScript. I tried to write in CoffeeScript using Ruby examples and I succeeded I think.

Now I'm trying to make language sections more independent. Trying to think about programming in general rather than on language features (but surely you can't avoid specific language features if they are good). That's why there is a functionality that hides a section if there are no examples in both languages.

Now there are quite similar languages (mostly object-oriented) but I think we can add even functional languages. Imagine we were comparing Ruby and Elixir. There would be a lot of "No easy way to do that" but still there would be sections with the both langs. You can look at them and understand what are the similarities and what are the differences.

Thank you for sharing you thoughts. I understand the problem and will think about it.

evmorov avatar Jun 21 '16 21:06 evmorov