gorillascript
gorillascript copied to clipboard
on homepage, provide introduction for those familiar with other compile-to-JS languages
From a comment by egonschiele on the Hacker News story about the GorillaScript home page:
As a small complaint: After seeing about a dozen compile-to-JS languages, I don't care about the full list of features anymore. Please add a big note at the top saying how this is different from other compile to JS languages. Why save all the good stuff (typing, promises, currying) for the last half of this massive page?
The real hard part about this issue is writing it in such a way that doesn't make me seem like a jerk.
The part I'm most interested in is the list of CoffeeScript features not implemented in GorillaScript. Or maybe a porting guide?
Like e.g. executable class bodies. GS seems to follow the CS idea of expanding @ into the class function inside the class body, but does not seem to allow to assign anything to them:
class Foo
let @helper(xxx) ...
class Bar extends Foo
@helper 42
class Foo
@helper := #(xxx) ...
class Bar extends Foo
Foo.helper 42
@ckknight Thanks, somehow I didn't try := (I've tried let and def, oops).
But that wasn't really a question for this ticket, it was an example of the stuff that can/should be explained in the porting guide.
maybe something like livescript's CoffeeScript to LiveScript Conversion Guide (gorillascript reminds me of livescript)
If you’re worried about sounding like a jerk when comparing your language to others, you can start by just factually listing the differences in features. You can add the justifications for those differences to the document later, being careful to acknowledge why the other language didn’t choose to include that feature. Some possible such reasons:
- the other language’s target audience is different
- the concept of that feature wasn’t as developed when that language was made
- the other language needs to stay backwards-compatible with prior editions
- only some people like that feature (such as significant indentation)
An outline of a comparison to CoffeeScript (the JS-replacement language I know best):
A note for those familiar with CoffeeScript
CoffeeScript is another language that compiles to JavaScript. If you are familiar with CoffeeScript, here is an overview of how GorillaScript is different. [If you can describe it simply, also describe how GorillaScript’s language design philosophy differs from CoffeeScript’s “It's just JavaScript”.]
- CoffeeScript features not in GorillaScript
- [anything?]
- GorillaScript features different from CoffeeScript
- ranges of numbers are written as
0 til 10instead of0...10- etc.
- GorillaScript features not in CoffeeScript [make these links to the corresponding section of documentation]
- typing
- promises
- currying
- macros
- etc.
Alright, good advice.