Hyperapp: Rename exported global from `hyperapp` to `Hyperapp`.

Created on 4 Sep 2017  ·  8Comments  ·  Source: jorgebucaran/hyperapp

This is a proposal only relevant to CDN users. If you are using ES5 or ES6 via a module bundler, etc., you have nothing to worry about.

Before

🚫 const { h, app } = hyperapp 

After

✅ const { h, app } = Hyperapp 

Related: https://github.com/hyperapp/hyperapp/issues/352

Community Feature Wontfix

Most helpful comment

In a unexpected turn of events, I'm closing here and https://github.com/hyperapp/hyperapp/issues/352 and leaving things the way they are!

All 8 comments

I like hyperapp. It's so minimal and tiny. Hyperapp looks like it should be HyperApp then.

I like hyperapp. It's so minimal and tiny.

Agree.

Hyperapp looks like it should be HyperApp then.

Not really. It's a matter of perspective. "Hyperapp" is a whole word.

@lazarljubenovic Now, the real issue is that then what do you name the router, logger or awesomeThing?

HyperappRouter > hyperappRouter
HyperappLogger > hyperappLogger
HyperappAwesomeThing > hyperappAwesomeThing

BTW, the above is just a proposal, if people prefer hyperappRouter, then so be it. Remember this only for CDN use.

/cc @lukejacksonn @zaceno

"Hyperapp" is a whole word.

The ligature ha from the logo made it two words in my head. Can't unsee it now. :sweat_smile:

It is probably worth making clear that, for any apps/demos that rely on the window.hyperapp namespace already (codepens especially officials and forks), this is a breaking change.

I prefer hyperapp and therefore would support hyperappRouter (camelCase module convention) on the grounds of, same advantages less disruption.

Either way I will be happy if there is consistency :)

I'm not a fan of using snake_case as the primary case, but what about using _ as a separator between hyperapp and package name? It would make it obvious that it's somehow related, yet not as related as multiple words on the right.

For example.


Not only that hyperapp is not immediately visible as a separate entity, even the right part of the word is not. You have to read the whole thing and midway through realize that "hyperapp my awesome--" doesn't make sense, so it's actually "hyperapp [pause] my awesome thing".

Compare with this.


You immediately see both hyperapp and myAwesomeThing.


The thing which would confuse people it that most commonly used packages would probably have a single word, like hyperapp_router. This might lead developers to a wrong conclusion that the convention is to use snake case all the way: hyperapp_router_my_awesome_thing, which is again not desirable because we do not see name of the package closer together.

I'm reading too much into this, right? :sweat_smile:


By the way, do we have any statistics of how often people use CDN? I mean, when people try out a library, they play with a demo which already has the imports and a hello-world example. The way I see it, only experienced users would prefer a CDN. I know it sounds contradictory at a first glance, because setting up the build system is more advanced, but I think that with all the seed projects, people prefer having a build pipeline which allows them to use JSX.

@lazarljubenovic I think the most common use of CDN is for codepen examples and similar. I feel pretty certain any real project will be using npm and a build system of some kind.

@lazarljubenovic The thing which would confuse people...

I don't see anyone confused with React, ReactRedux, ReduxThunk or ReactRouter (although maybe they are, but for other reasons 😏😄).

In a unexpected turn of events, I'm closing here and https://github.com/hyperapp/hyperapp/issues/352 and leaving things the way they are!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jbrodriguez picture jbrodriguez  ·  4Comments

joshuahiggins picture joshuahiggins  ·  4Comments

jacobtipp picture jacobtipp  ·  3Comments

dwknippers picture dwknippers  ·  3Comments

ghost picture ghost  ·  3Comments