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

What makes Mint unique? #70

Closed
s0kil opened this issue Aug 11, 2018 · 12 comments
Closed

What makes Mint unique? #70

s0kil opened this issue Aug 11, 2018 · 12 comments
Labels
question Further information is requested

Comments

@s0kil
Copy link
Contributor

s0kil commented Aug 11, 2018

For example Elm offers no runtime exceptions, which is amazing.
What makes Mint amazing ?

@handicraftsman
Copy link

Embedded features of libraries like React, Redux, Aphrodite, etc.

@gdotdesign
Copy link
Member

Pretty much what @handicraftsman wrote. In Mint everything is built in so to speak.

I'm writing a post about comparing it with a popular JavaScript stack (which I post here when ready), in it I compare are all the things Mint has built in to their counterpart in the JS stack:

  • view (virtual DOM) -> react
  • global state handling -> redux
  • routing -> react-router
  • formatter -> prettier
  • development server + production building -> webpack (babel and it's plugins)
  • package manager -> npm
  • type checker -> flow
  • documentation generator -> esdoc
  • styling -> styled-components
  • testing framework -> jest, enzyme

On top of this there are 300+ nice error messages, easy JS interopability and probably some small features I am forgetting.

Mint is still young there will be more features added in the future check them out on the roadmap.

@s0kil
Copy link
Contributor Author

s0kil commented Aug 13, 2018

@gdotdesign So Mint integrates does libraries behind the scenes? Or just offers what those libraries offer?

@gdotdesign
Copy link
Member

@DanielSokil It just offers what those libraries offer, except React which is integrated as the view layer.

@s0kil
Copy link
Contributor Author

s0kil commented Aug 13, 2018

@gdotdesign One drawback of having react + redux, etc is the large bundle size, I was wondering if same applies to Mint?

@gdotdesign
Copy link
Member

I think bundle size using Mint can be generally kept low, the "runtime" (https://github.com/mint-lang/mint-runtime) currently is ~150kb minified, 100kb of which is React.

The bundle size of the Mint website (https://github.com/mint-lang/mint-website) is 69kb gzipped (~280kb extracted) which contains the styles as well.

There are two things that could make this even smaller:

  • dead code elimination - because of the type checking in theory, not used components / modules / functions could be removed during compilation, it's something I'm planning to implement in the future
  • replace React with something smaller, possibly Preact. For this I need to experiment to see if all the features needed are supported.

@s0kil
Copy link
Contributor Author

s0kil commented Aug 14, 2018

@gdotdesign For dead code elimination, would I need to use a tool like rollup, or that feature will be built into Mint?

@gdotdesign
Copy link
Member

@DanielSokil It will be built into Mint.

@gdotdesign
Copy link
Member

gdotdesign commented Aug 17, 2018

I've added this question to the FAQ in the readme pointing to this thread, so I'm closing this.

@s0kil
Copy link
Contributor Author

s0kil commented Aug 18, 2018

@gdotdesign Thanks very much for your detailed responses.

@ghost
Copy link

ghost commented Jan 23, 2019

Preact would significantly lower the size

@ghost
Copy link

ghost commented Jan 23, 2019

Very interesting language!

@Sija Sija added the question Further information is requested label Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

4 participants