Hacker News new | ask | show | jobs
by cameronkknight 4725 days ago
and= isn't all that useful, I agree, but it would be odd to leave out given that there's or=, ?=, ownsor=, etc.

\alpha-bravo-charlie == "alphaBravoCharlie"

Well, since GorillaScript doesn't require parentheses for invocation, you'd need to have some delimiter between the context and the arguments or have to wrap one of them. Why not simply just use "," as the delimiter and then you can treat it as if doing .call/.apply?

1 comments

> Well, since GorillaScript doesn't require parentheses for invocation, you'd need to have some delimiter between the context and the arguments or have to wrap one of them.

Well, I was trying to think why you'd even need a delimiter. I thought the absence of the comma between the context and the first argument would disambiguate:

  f@x (a, b, c)
would be written as:

  f@x a, b, c  // Comma between a and b
While:

  f@(x a) (b, c)
would be:

  f@x a b, c  // No comma between a and b


Then again, a call like:

  f@ a b c d, e
would be ambiguous, so on second thought I think you've made the right decision.

Heck, even the non-ambiguous cases seem easier to mentally parse with the comma there.

So I retract from what I said. I should have thought this through before posting.

Edit: I see you've also added the example of dashed-names to camelCase conversion to the page. Thanks, that helps. Edit2: formatting.