Fable: Function, Symbol & Error

Created on 25 Mar 2019  路  12Comments  路  Source: fable-compiler/Fable

Description

Function, Symbol and Error used to be part of Fable.Import.JS.
Do these types still exist?

Related information

  • Fable version: 2.2
  • Operating system: Windows 10

Most helpful comment

I want to help out and would keep it under the Fable org.

All 12 comments

I guess they do :) I removed these types (together with String, Boolean, Number) from Fable.Core because I found it confusing to have JS versions of types that could be used in F# (Error is System.Exception).

The only outsider is Symbol, but I didn't any use case for having it in Fable.Core. In my view, when you need to call directly the JS Function or Symbol APIs the F# code starts to look ugly very quickly, and in those cases it's usually better to just write JS or Typescript and communicate with the F# code.

Do you need these types? What would be the use case? If necessary, I'm still not sure if they should be added back to Fable.Core or published in a separate package.

Fable.Import.Express and Fable.Import.Node uses those types.
Maybe the broader problem is that ts2fable will still output these types?

The idea is to deprecate the fable-import repo and move each package to its own repo, so we will have to update them anyways. For node, I'd like to do something similar to what we've done for Browser APIs: split it into a separate package for each node module. It'd be great if we could get volunteers for this :wink: (and overall somebody to maintain the node bindings).

And yes, ts2fable will have to be updated :)

Hmm NodeJS might not be that important to split up into own packages. No real need to optimize for bundle size in a node app in my honest opinion. The current repo already contains separate files so that seems maintainable to me. Feel free to disagree though.

What do you think @whitetigle? I believe you are using Fable for node as well.

I'll make a separate issue for ts2fable.

I have the same opinion of @nojaf. I don't think of splitting Node will improve the User Experience.

There could be some benefits like speeding up the compilation bootstrap time of apps referencing the Node packages, but anyways, maintainability is the most important criteria here, so if having separate files is enough for that (they're not so big anyways) it should be fine.

What I would love is someone moving the package away from "fable-import", update it (removing the "Fable.Import" prefix) and taking ownership of it 馃樃

What I would love is someone moving the package away from "fable-import", update it (removing the "Fable.Import" prefix) and taking ownership of it 馃樃

Still under Fable org? Or under the person name?

I could take ownership of it as I am starting to have several projects running on top of Node.js itself. And so know several manual improvements that can be made to it.

Either option works for me :)

However, it'd be nice if someone else could help. You already take care of many packages ;)

I want to help out and would keep it under the Fable org.

Same here!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

et1975 picture et1975  路  3Comments

forki picture forki  路  3Comments

forki picture forki  路  3Comments

rommsen picture rommsen  路  3Comments

alfonsogarciacaro picture alfonsogarciacaro  路  3Comments