Giter Club home page Giter Club logo

Comments (3)

yawaramin avatar yawaramin commented on June 25, 2024

I guess this would require writing a translator from WebIDL to BuckleScript bindings. It does sound like a large effort though. The approach we have taken in this repo is a 'pay-as-you-go' one, where we write the bindings as we need them. Of course, more bindings are always welcome.

Would you be willing to look into the WebIDL translation approach?

from bs-webapi-incubator.

dodomorandi avatar dodomorandi commented on June 25, 2024

I guess this would require writing a translator from WebIDL to BuckleScript bindings.
This already exists, but unfortunately it does not seem to work with the actual implementation of WebIDL (I already tried). Furthermore, the same author already started something like this, but the project have been abandoned and deprecated in favor of this repo.

I think that it would be very interesting to start from the code already available (Rust or Ocaml) in order to start creating web api bindings.

Would you be willing to look into the WebIDL translation approach?
I can try, but I honestly just discovered ReasonML, and I am not sure about the quality of the code I would write. Moreover, I would be able to work on this project only a few hours a week, and even if any contribution is important, I don't think I have the traction to bring something like this to a production state just by myself.

The approach we have taken in this repo is a 'pay-as-you-go' one, where we write the bindings as we need them.
I would like to express some criticisms to this approach. Don't get me wrong: I want to share my thoughts because I think ReasonML is incredibly powerful, and I would really like to see its wide adoption.

At the actual state of the art, ReasonML can be a very good fit for an early adopter that wants to build a webapp, because ReasonReact is awesome. But if you just want to use ReasonML for normal web scripts, than you are likely to stumble with some web api that has not been implemented. If you are already into the ReasonML community, there is a good probability you are going to write the implementation and send a PR. However, most people are just approaching Reason, and if they find themselves in a situation like I just described, they will probably think "nice language, but the ecosystem is still immature" and they will keep using JS or switch to TS.

I know that using an approach "pay-as-you-go" is easier, but given that we don't even have a "webapi support table", it is something that I don't think it is something it can work in the long term. I can see some open and closed issues asking for features, without any sent PR. This is exactly the problem I am talking about -- instead of making people want to use ReasonML, we are pushing them away.

I would really like to take these thoughs as positive criticisms, and I would like to contribute to this project, but I think that the project should focus to a more automated approach. Why bs-gen has never been taken into account? Maybe there are some major concerns that I am not aware about. Any any case, thanks for reading this! 😊

from bs-webapi-incubator.

yawaramin avatar yawaramin commented on June 25, 2024

I hear your point. The truth is I had no idea that bs-gen existed. People don't always announce their projects, perhaps because, as in this case, they are still very much experimental.

I agree that it would be great to have a complete set of auto-generated bindings from the Web API IDLs. But as you can see, the projects here are very much community-driven. We don't have a dedicated, paid team implementing feature requests :-) For better or worse, that means the Reason community is self-selecting for people who are willing to spend the time and effort to invest in it and contribute features, fixes, docs, etc. It's not going to have a shortcut to mass adoption, but will need to get where it's going slowly :-)

from bs-webapi-incubator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.