Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility table for es6 compilers? #99

Closed
katywings opened this issue Sep 5, 2017 · 4 comments
Closed

Compatibility table for es6 compilers? #99

katywings opened this issue Sep 5, 2017 · 4 comments

Comments

@katywings
Copy link

Hey Andrea, i just watched your talk and was amazed about its depth - thanks for the details!

One question arrived when you mentioned the typescript compilation of tagged template literals: as a Buble user i was wondering how they are doing it and it looks like they doesnt even have enabled tagged tl's by default and use typescripts compilation method in the other case. I need to try it out, but it looks like hyperHTML is only compatible with Babel as ES6 compiler right? Are there any escape hatches for this? :)

In the README you basically indirectly mentioned this anyway:

Also compatible with Babel transpiled output

I think, not all people would interpret this like: "Only compatible with Native ES6 or ES6 by Babel" and would just think: "Oh when its working with Babel, then its basically also working with Buble! And it could be a place of frustration for newcomers! So all I want to actually say: maybe this should be mentioned more explicit - or even with a little compiler support table or so ;)

Last but not least: i like your effort, keep up the cool ideas! ☕️

@WebReflection
Copy link
Owner

WebReflection commented Sep 5, 2017

Hi @katywings , thanks for sharing my own talk I wasn't even aware it was live already!!!!

I'll try to answer as I can to your questions.

it looks like hyperHTML is only compatible with Babel as ES6 compiler right?

hyperHTML is 100% compatible with ECMAScript Standard. If transpilers are not compliant, like it is for TypeScript, it's not an hyperHTML compatibility issue, isn't it? 😉

TL;DR you don't need any compiler/transpiler to use hyperHTML ... actually, these days, the less you transpile the safer you'll code.

However, Babel got Template Literals transpiled well.

"Oh when its working with Babel, then its basically also working with Buble! And it could be a place of frustration for newcomers!

Your frustration comes from Microsoft TypeScript project ignoring on purpose specs compliant implementation of template literals.

Please rise your voice there, because hyperHTML has no fault whatsoever about that.

Apologies if this is not the answer you were hoping for. All I can say is that scarying developers because they chose a non standard language is not the purpose of this project; I rather push TypeScript to fix their issues ASAP.

WebReflection added a commit that referenced this issue Sep 7, 2017
As discussed in bug microsoft/TypeScript#17956
TypeScript does a bad job compared to Babel when it comes
to transform tagget template literals.

Apparently users are ignoring this issue
#99
so this version of hyperHTML should fix it.
@WebReflection
Copy link
Owner

Hi @katywings ,
I'd like to inform you that after a long discussion on TypeScript repository, a work around to feature detect TypeScript bad compilation came out.

As result, I've pushed a patched version of hyperHTML that will work on your environment too.

Please try latest v1.6.7 and let me know if everything is fine.

Thanks for making this happen, I wouldn't have pushed much if it wasn't for you.

Best Regards

@katywings
Copy link
Author

@WebReflection

First and foremost, thanks again for your engagement! Now i need to say, your first answer sounded like you misinterpreted me :): I actually really just opened this issue to warn you about the potential of user frustration - not because i was in any way frustrated by myself - i mean i didnt even try it out xD, i just added one and one together when i heard Typescript problems and therefore also potential Buble problems. And as a library author by myself i know how fast user opinions can be pulled into the negative zone ^^!

About non-transpilation strategies: i personally am not in hurry to remove the build step - just feeling like its some months too early ;)...

But now after you did so much I really need to give hyperHTML a try, right?!!! :D - probably have some "minutes" this weekend - hopefully! Currently my todo list's pagination is over 9000...

@WebReflection
Copy link
Owner

ah yeah ... Todos ... you can do that too https://github.com/WebReflection/hypermvc 😄

Btw I did misunderstood your initial post indeed, apologies for that.

If you'll ever have time to try it out, please don't hesitate to ping me if needed (there is also a new StackOverflow tag for it)

Best Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants