Closed Arkaedan closed 1 year ago
Personally, I am against these aliases (e.g. we could add an alias 'map' for 'collect' - as in other languages) as IMHO, having multiple ways to do the same operation confuses users and adds to the complexity of the language.
Thanks for the PR! I appreciate the cognitive benefits of consistency with other languages but I'm inclined to agree with @arcanefoam on this one.
In general, I agree that it's better to have just one way to do things. However, this specific case is something that I've seen almost every developer learning Epsilon (that I've worked with) get tripped up by.
Additionally, EOL has plenty of precendence for having multiple ways of doing the same thing. For example:
=
and ==
!=
and <>
var foo : new Bar;
and var foo = new Bar;
var result = foo ? bar : baz;
and var result = foo ? bar else baz;
getAllOfKind()
, allInstances()
, and all()
first()
and at(0)
firstToLowerCase()
and ftlc()
That being said, maybe the best option is to just update the documentation for concat
to mention that is is equivalent to the join method in many other languages. I'd be happy to submit a PR for that if you can point me in the right direction.
@Arkaedan I agree that EOL has other constructs that have alternative names/syntax. However, the motivation for this syntactic sugar is no longer valid and we are now trying to reduce them, as it not only makes the language harder to learn, but also places additional complexity in the execution engines.
That said, the Epsilon's website is also hosted in github: https://github.com/eclipse/epsilon-website. The website is built using mkdocs. So to modify a page, you need to modify the related MD file inside the mkdocs folder. For EOL, the specific file you want to change is <path-to-repo>/mkdocs/docs/doc/eol.md
.
After you done the changes, you can build using the publish.sh script in the mkdocs folder and crate a PR.
Will close this PR, but feel free to open it again if you feel there is the need for further discussion.
This article should also be useful: https://www.eclipse.org/epsilon/doc/articles/manage-the-epsilon-website-locally/
This is for consistency with other languages including Java, JavaScript, C#, Python, Rust, and PHP