-
Notifications
You must be signed in to change notification settings - Fork 469
Replace ocaml style oo with js style #4967
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
Conversation
1. unsafe_downgrade is not needed
- check Js_oo.unsafe_downgrade later
- this may not be needed, check later
Does this mean that ocaml object and classes are definitely dropped, even when using the ocaml syntax ? |
@hhugo yes. It does not translate to JS semantics well so that the generated code is bloated and not debuggable. Do you have any use case in mind? The primary use case seems to be supporting some existing code which jsoo already does a very good job, but the maintainance overhead is non-trivial, lots of our internal data representation changes also need take care of objects part which is easy to get it wrong. |
I'm just asking to understand the situation better |
Fixes rescript-lang#277 Fixes rescript-lang#263 Now that rescript-lang/rescript#4967 has landed: - Parse `{"foo": int}` as ocaml `{. foo: int}`. Previously it parsed into ocaml `{. foo: int} Js.t` - Remove a tiny printing optimizations for `Js.t`. - For React's PPX 3, generate objects directly instead of `Js.t` objects. cc @rickyvetter @ryyppy for ppx4. - The re->res converter automatically removes the `Js.t` part. - Said converter has a bug (rescript-lang#263) that converts `Js.t({..}) as 'a` into `{..} as 'a` from naturally forgetting to special-case that path. Now this bug is conveniently ~~made into a feature~~ obsolete.
Fixes rescript-lang#277 Fixes rescript-lang#263 Now that rescript-lang/rescript#4967 has landed: - Parse `{"foo": int}` as ocaml `{. foo: int}`. Previously it parsed into ocaml `{. foo: int} Js.t` - Remove a tiny printing optimizations for `Js.t`. - For React's PPX 3, generate objects directly instead of `Js.t` objects. cc @rickyvetter @ryyppy for ppx4. - The re->res converter automatically removes the `Js.t` part. - Said converter has a bug (rescript-lang#263) that converts `Js.t({..}) as 'a` into `{..} as 'a` from naturally forgetting to special-case that path. Now this bug is conveniently ~~made into a feature~~ obsolete.
Fixes #277 Fixes #263 Now that rescript-lang/rescript#4967 has landed: - Parse `{"foo": int}` as ocaml `{. foo: int}`. Previously it parsed into ocaml `{. foo: int} Js.t` - Remove a tiny printing optimizations for `Js.t`. - For React's PPX 3, generate objects directly instead of `Js.t` objects. cc @rickyvetter @ryyppy for ppx4. - The re->res converter automatically removes the `Js.t` part. - Said converter has a bug (#263) that converts `Js.t({..}) as 'a` into `{..} as 'a` from naturally forgetting to special-case that path. Now this bug is conveniently ~~made into a feature~~ obsolete.
This is … very bad. Yikes. This level of invasive backwards-compatibility (cross-compatibility?) breakage against upstream OCaml … really, really makes BuckleScript useless for me. Is this where ReScript is heading? Does this also mean that we'll never see a rebase past 4.06.1? /= No, JSOO is not a good replacement. |
Fixes rescript-lang#277 Fixes rescript-lang#263 Now that rescript-lang#4967 has landed: - Parse `{"foo": int}` as ocaml `{. foo: int}`. Previously it parsed into ocaml `{. foo: int} Js.t` - Remove a tiny printing optimizations for `Js.t`. - For React's PPX 3, generate objects directly instead of `Js.t` objects. cc @rickyvetter @ryyppy for ppx4. - The re->res converter automatically removes the `Js.t` part. - Said converter has a bug (rescript-lang#263) that converts `Js.t({..}) as 'a` into `{..} as 'a` from naturally forgetting to special-case that path. Now this bug is conveniently ~~made into a feature~~ obsolete.
No description provided.