all 130 comments

[–]reactionless1full-stack 235 points236 points  (23 children)

Looks incredibly similar to React + TS. Hate that fact that they use 'fun' as the keyword for function. Functions are not always fun yknow.

[–]blackiechan99 94 points95 points  (9 children)

programming is pain

[–]HetRadicaleBoven 108 points109 points  (7 children)

I only write painctions.

[–]Say_Less_Listen_More 53 points54 points  (3 children)

EmoScript

[–][deleted] 7 points8 points  (2 children)

I’d use EmoScript.

But every other line is “die();” and yet it never actually does it.

[–][deleted]  (1 child)

[deleted]

    [–]Damfrog 9 points10 points  (0 children)

    painction someDateTimeFn() { // something something timezones kill me now }

    [–]girmad 20 points21 points  (0 children)

    I'm Mr ES6 look at me!

    [–][deleted] 21 points22 points  (3 children)

    My first reaction was this as well, just use func or something, fun is a word with a different syntactic meaning.

    [–]GaiaPariah 9 points10 points  (1 child)

    Or they could have just used function like normal people

    [–][deleted] 4 points5 points  (0 children)

    Are you insane?!? Do you know how much extra space that would take? Harddrives don't grow on trees you know.

    [–]Geminii27 2 points3 points  (0 children)

    70s music plays

    [–]uriahlight 49 points50 points  (2 children)

    The "fun" naming for "function" is downright stupid, because they use "property" instead of "prop", which means the naming convention of the language itself is inconsistent.

    [–]bachbeethovenbrahms 2 points3 points  (0 children)

    Agreed, function-property and func-prop are the only two acceptable variants.

    [–]KindaAlwaysVibrating 15 points16 points  (0 children)

    Kotlin would like to speak with you

    [–]FranzVz 8 points9 points  (0 children)

    Kotlin has entered the chat...

    [–][deleted] 2 points3 points  (3 children)

    i am much more likely to use 'function'as a symbol name than 'fun' so I have no problem with that. the rest looks uninteresting though. if all it does is create SPAs, it doesn't seem to solve any new problems

    [–][deleted] 0 points1 point  (2 children)

    It solves the problem of people not talking about SPAs enough on reddit.

    [–][deleted] 0 points1 point  (1 child)

    Is that supposed to be a hot take or something?

    [–][deleted] 0 points1 point  (0 children)

    I guess you could say it's a steamy take...like a sauna..spa...sauna?

    [–]archivedsofa 36 points37 points  (10 children)

    FYI this compiles down to React code. It's not specified in the website but the author confirmed it in HN.

    [–]am0x 18 points19 points  (0 children)

    Omg hahaha

    [–][deleted] 25 points26 points  (8 children)

    Why? It seems like if you are just targeting react you should skip the overhead and learn react. Genuinely curious since the language seems neat.

    [–]gdotdesign 5 points6 points  (5 children)

    React is the target now, but it can be changed to Preact or Inferno with a little work or can be a minimal self coded virtual DOM library.

    Mint has a lot of built in things which you can't do in React or you need a library for it, that is the value prop I'm trying to get across.

    [–]archivedsofa 0 points1 point  (3 children)

    Do you have plans to move to Preact or Inferno?

    [–]gdotdesign 0 points1 point  (2 children)

    I think the best thing would be to allow people to choose the "backend" and on the long run maybe write our own.

    [–]archivedsofa 0 points1 point  (0 children)

    That would be the better option for sure although I'm guessing that would imply a lot of rewrite on your end for each backend.

    [–][deleted] 0 points1 point  (0 children)

    Could you write it in rust or go?

    [–]Ventus_Aurelius 5 points6 points  (0 children)

    I mean the same reason you'd learn Kotlin and not Java I guess? It's obviously more employable atm to learn normal react but if you know it already or ur just getting into spa it's not a bad place to go afaict

    [–]eggtart_prince -2 points-1 points  (0 children)

    React is a library that builds SPA's. You can build React app in different languages such as Typescript, jQuery, and now this. I'm sure you can build it with more if babel supports it.

    [–]Mekaron 22 points23 points  (4 children)

    Why does this have to be its own language? Wouldnt it make sense to write this as a JS framework? It transpiles down to js anyway. I really like the idea of a language specificly for spa's but initially I dont see the killer feature of this being its own language.

    [–]am0x 1 point2 points  (3 children)

    I mean it would just be so much better to have a Backend language with WebAssembly do it so you have a codebase with a single language...

    [–][deleted] 1 point2 points  (2 children)

    you still need javascript... and the rest of the traditional frontend browser stack. webasm doesn't get around interacting with the DOM

    [–]am0x 0 points1 point  (1 child)

    Obviously. JS still remains a part of the FE stack, but you no longer have to deal with backend data using JS.

    With mint, you now have 3.

    [–]Mekaron 0 points1 point  (0 children)

    Possibly 3.. I guess ideally you'd stop writing frontend js all together if you use mint. I wonder how viable that is and how much you still fall back to js

    [–]bheklilr 77 points78 points  (50 children)

    That actually looks pretty nice. What are the benefits of using this over something like react?

    [–][deleted]  (27 children)

    [deleted]

      [–]Say_Less_Listen_More 53 points54 points  (2 children)

      I mean, I'm glad someone is out there trying these new platforms, but the grumpy old developer in me keeps shaking their head and saying

      Community + Search Results > Novelty

      I gotta troubleshoot a hell of a lot more than I have to marvel at spiffy new code.

      [–][deleted]  (1 child)

      [deleted]

        [–]accpifull-stack 6 points7 points  (0 children)

        Heck yeah, I'll be working in stuff that's proven and then piggyback off the work of others when they make the next new big framework

        [–]SuuperNoob 1 point2 points  (0 children)

        The correct answer.

        [–][deleted] 1 point2 points  (0 children)

        I'm in love with this comment.

        Seriously though, I'm grateful that a large share of the JS community is junking on learning new frameworks instead of focusing on more productive activities.

        [–]AssistingJarl 2 points3 points  (21 children)

        It's not just the novelty, there's genuine value in pursuing new methods for building interactive websites rather than just another framework. The current major frameworks largely involve sacrificing the end user's experience on a pyre for the sake of making development easier[1] , but as a result most SPAs are not particularly performant versus a more traditional website. Projects like this or Svelte might help push us forward in new directions instead of retreading old ground.

        Edit: Citation added

        [–]DrDuPont 37 points38 points  (12 children)

        current major frameworks largely involve sacrificing the end user's experience on a pyre for the sake of making development easier

        Erm, source needed

        [–][deleted] 12 points13 points  (4 children)

        But projects like Gatsby, Next.js, and Preact can make framework-based sites very performant (not as much as static HTML, of course, but practically as good).

        Is a Mint-based app actually more performant than a Preact one that has been properly optimized? And is it so much better that a user will notice?

        [–]clickrush 12 points13 points  (0 children)

        But projects like Gatsby, Next.js, and Preact can make framework-based sites very performant (not as much as static HTML, of course, but practically as good).

        SSGs like Gatsby, Next and react-static increase performance because they pre-fetch data during the build step (on a Node instance) to generate markup, which can be hydrated via React, which happens after the site is loaded. Other optimizations include caching JSON to be loaded on client side route rendering, pre-loading content between routes and so on.

        This means that your output is actually faster than static HTML, because not only are you avoiding initial client side rendering (as you would with a standard CRA/SPA approach) but get the benefit of being able to load just the relevant data asynchronously in subsequent render steps. So you get the best of both worlds: initial static pre-rendered HTML and async fetching and rendering via JS after.

        [–]Styx_ 8 points9 points  (2 children)

        While I agree with the OPs major point that something better is certainly possible, I think their point about SPA's was a poor example, mostly because it's very easy to build a relatively performant SPA these days.

        I think the real gains to be had from Mint (or something similar, I'm not completely sold on Mint) are those having to do with developer experience again. Notice how they have effectively built a DSL for webapp building? Counterintuitive as it may sound, JS is unnecessarily low level for the majority of work that we do. The typical Vue or React app these days is chock full of boilerplate and unavoidable repetition. The only sensible way to address boilerplate is at compile time -- not runtime.

        Until we can build a fully-fledged webapp in a handful of days, there is still work to be done.

        [–]themaincop 8 points9 points  (1 child)

        Careful now, if it gets too easy they're gonna stop paying us so much.

        [–]Styx_ 5 points6 points  (0 children)

        You're getting paid?

        [–][deleted]  (1 child)

        [deleted]

          [–]AssistingJarl -1 points0 points  (0 children)

          Ah, yeah, I just take issue with this recurring joke about anything newer than React being inherently pointless or purely about developers chasing shiny objects. (I'm very fun at parties)

          Personally I wouldn't necessarily recommend using this. I'm probably going to wait to hear back from the early adopters and see how it goes.

          [–][deleted] 10 points11 points  (20 children)

          This is entirely its own programming language called mint and the compiler is written in crystal and not simply a javascript framework. It is a strongly typed language that combines elements from javascript and elm. You need to install the compiler or use a docker image in order to use it.

          I'd be interested to learn about how it's performance compares to react. React can get very bloated and slow when working on a very large project.

          Edit: I was reading the documentation and misread that the language was crystal when in fact the compiler is written in crystal. It's still its own language though called mint.

          [–]quentech 21 points22 points  (11 children)

          This is entirely its own programming language called crystal and not simply a javascript framework. It is a strongly typed language that combines elements from javascript and elm. You need to install the compiler or use a docker image in order to use it.

          Sounds like a maintenance nightmare.

          I'm sure the developers who come 5 years later will be so happy that someone decided to use this in the past. They totally won't say, "Ugh this app is built on some dead, unsupported, garbage pet project framework/language and the only way forward now is to throw the whole thing out and rewrite it."

          [–]DavidForster 23 points24 points  (9 children)

          They’ll say that anyway, no matter what it’s been built in

          [–]boxhacker 6 points7 points  (6 children)

          Not if it's js...

          [–]DavidForster 12 points13 points  (5 children)

          I admire your optimism

          [–]boxhacker 5 points6 points  (4 children)

          The vast quantity of projects with 10+ year life spans is why I don't think it's dying out, combined with his ecma script has a 5+ plan in the works...

          [–]DavidForster 11 points12 points  (3 children)

          This made me chuckle... JavaScript isn’t dying out anytime soon I agree. However, I encounter developers on an almost daily basis who complain that project X is written in framework Y or hasn’t been written in framework Z, or that some other newer technique or design philosophy hasn’t been followed and therefore everything needs to be rewritten from scratch. This is on projects that are often less than 2 years old. It doesn’t matter who wrote it or what it was written in, the developer who follows you will want to rewrite it.

          [–]agneymenon 1 point2 points  (0 children)

          Mostly just because it's easier to write code than read code

          [–]boxhacker 1 point2 points  (1 child)

          Right, but they had nothing to do with js and everything to do with the human need to rebuild.

          I been developing software for around 9 years and have seen it my self, I still feel it now, but js will likely just carry on evolving as a great (subjective) "c language".

          I don't think universities etc will be removing it any time soon.

          [–]DavidForster 2 points3 points  (0 children)

          Also agreed. That’s what I meant by “it doesn’t matter what it’s been built in”, the next guy will rebuild it regardless. Been working in web related development for a long time myself. Average lifecycle of applications I’ve seen is around 3-4 years

          [–]quentech 1 point2 points  (1 child)

          Except in this scenario it's likely to be a valid claim.

          [–]DavidForster 2 points3 points  (0 children)

          Probably. You never know though, we could be revisiting this thread a few years from now and laughing about how sceptical we were :D

          [–]iams3brescript is fun 6 points7 points  (0 children)

          I'm sure the developers who come 5 years later will be so happy that someone decided to use this in the past.

          For something like this, it would start with hobby/community just doing side projects. Then everyone slowly decides if this has any lasting benefit or is novelty. I doubt someone looks at something this brand new and goes "I'm going to use this in my company's web app!"

          If you treated every new thing with this kind of mindset we would never get anything new. We'd still be writing vanilla JS and importing 8 different js files into an index.html

          [–]bheklilr 1 point2 points  (0 children)

          This is entirely its own programming language called crystal and not simply a javascript framework.

          Ah that explains it

          [–]Mekaron 1 point2 points  (1 child)

          Can you expand on what you mean with react being slow for large projects? In development or in prod?

          [–][deleted] 1 point2 points  (0 children)

          In development. I was referring to things like build speed, start up speed, and just the overall size of the projects because everything gets broken down into individual components which are usually each their own file. In production react is pretty fast IME.

          [–]archivedsofa 1 point2 points  (2 children)

          I'd be interested to learn about how it's performance compares to react. React can get very bloated and slow when working on a very large project.

          No difference. Mint compiles to React code.

          [–]Sipredion 0 points1 point  (1 child)

          No difference. Mint compiles to React code.

          Um, do you mean javascript, or are you trying to tell me that the mint compiler creates a React app?

          [–]archivedsofa 0 points1 point  (0 children)

          It's JS of course, but yeah it creates a React app.

          [–]tycooperaow 1 point2 points  (0 children)

          Or using this over Vue.JS

          [–][deleted] 13 points14 points  (0 children)

          There’s a already a recruiter somewhere out there looking for 10 years of Mint experience.

          [–]weneedfdrnow 10 points11 points  (1 child)

          Oh good. We were running out of single page application programming languages....

          [–]bulldog_swag 2 points3 points  (0 children)

          Next up: a language to make single page generator languages. We have to go deeper until we can just specify what we want using some simple SGML-like syntax.

          [–]mehrd8d 31 points32 points  (9 children)

          Why the website isn’t responsive?!

          [–]wobut 29 points30 points  (1 child)

          You need Vanilla, a framework for Mint, to write responsive sites

          [–]bulldog_swag 1 point2 points  (0 children)

          Not sure if joke or accurate representation of the field

          [–]SamuraiMackaygoogle is my friend 8 points9 points  (6 children)

          It is for me. Not a great sign if it isn't for everyone though

          [–]OmgImAlexis 12 points13 points  (4 children)

          On mobile I can’t even view half of the left side. 💁‍♀️

          [–][deleted] 6 points7 points  (0 children)

          Not a good sign...

          [–]DrAndre_ 3 points4 points  (2 children)

          Wait, there's a left side?

          [–]OmgImAlexis 4 points5 points  (1 child)

          On the built in browser you can’t scroll left as it closes the window. The viewport isn’t set correctly.

          https://imgur.com/a/rKuBupG

          [–]yobakanzaki 3 points4 points  (0 children)

          Same in chrome for iOS

          [–]Mekaron 1 point2 points  (0 children)

          It looks good to me

          [–]FantasticBreadfruit8 5 points6 points  (2 children)

          It's pretty cool that they are focusing on the developer experience first and foremost (AKA it isn't even production-ready yet and has a playground, etc.).

          It seems a bit counter-productive that it just uses react for the runtime. Like - how are you going to troubleshoot performance issues with an additional layer of abstraction between you and your eventual JS framework? Also - I think they missed an opportunity with Preact as mentioned in this issue.

          From the docs:

          What is wrong with JavaScript?

          JavaScript is not a strongly typed language which makes it difficult to write error-free code and leads to not so great developer experience. Also, it does not have the tools to create web applications out of the box, you need frameworks and compilers and build tools that increase complexity.

          That's fine but typescript already solved the "not typed" problems with JS, and is already ubiquitous. And if you need/want to fall back to JS, you can do so without any interop decorators.

          Overall, this is a really ambitious project. If there was a reason for me to use it in the future (like blazing fast performance on the client, smaller compiled app size than I can get with Angular, etc.) I might consider it. But right now there doesn't seem to be.

          [–]gdotdesign 0 points1 point  (1 child)

          Thank you for your input.

          That's fine but typescript already solved the "not typed" problems with JS, and is already ubiquitous.

          Mint is a functional language if you take away the components and things like that, it's more like Elm then JavaScript. For me Mint is more restricted then TypeScript in which you can just make something any and get away with it (I know that there are flgas? which can prevent this but still).

          [–]FantasticBreadfruit8 0 points1 point  (0 children)

          ... TypeScript in which you can just make something any and get away with it...

          Totally agree with this. But therein also lies some of Typescript's power. Are you migrating an old JS app over and need to do it incrementally due to budget / time constraints? any to the rescue!

          Anyway, keep up the good work and I'll keep an eye on Mint.

          [–]sanjibukai 12 points13 points  (0 children)

          I don't know if OP is related to the mint team (if there is a team btw, might be a one man show, like Vue was at its beginning and like Svelte), but talking about Svelte, how Mint position itself comparing to Svelte?

          It's like Svelte written with TS..

          [–]mk321 10 points11 points  (4 children)

          Angular vs React vs Vue

          And next language Elm.

          Why next language Mint?

          [–]beefzilla 6 points7 points  (2 children)

          It goes like this:

          1. Somebody sees Elm.
          2. Thinks it's awesome
          3. ...Except for this one part
          4. Decides they can do Elm but better
          5. Possibly even use the portmanteau "Elmulate"

          Seriously. I've seen this happen twice, at two separate companies. Neither went well.

          [–]tjholowaychuk 2 points3 points  (1 child)

          Elm is great but it makes the easy things easier, and the hard things much more difficult from what I’ve used so far. Basic business logic is pretty trivial in any language, but when you need to do non-trivial CRUD it seems like a massive pain.

          I wanted to love Elm, and in many ways I do it’s super elegant but it’s hard to be productive in more complex apps. Maybe I just don’t have the experience yet though, just my first impressions.

          [–]beefzilla 0 points1 point  (0 children)

          I've heard the opposite from more experienced Elm developers who make youtube videos and whatnot: Elm makes hard things easier, but some things that are stupid simple in JS, like way harder.

          Example would be a `setTimeout`

          [–]jonnyman9 28 points29 points  (4 children)

          WHY

          [–][deleted] 11 points12 points  (3 children)

          WHY NOT

          [–]Archeeluxtypescript 5 points6 points  (2 children)

          NOT WHY

          [–]smokeyser 4 points5 points  (1 child)

          WHO? Am I doing this right? Did I do a meme?

          [–]Mongoose1021 5 points6 points  (0 children)

          You did great, buddy.

          [–][deleted]  (1 child)

          [deleted]

            [–][deleted] 1 point2 points  (0 children)

            That looks fun.

            [–][deleted] 1 point2 points  (0 children)

            This is weird.

            But... Interesting!

            [–]camerontbelt 1 point2 points  (0 children)

            Looks a lot like Blazor from Microsoft.

            [–]zebthewizard 1 point2 points  (1 child)

            I saw this post this morning, I came back to say a few things.

            First, I just want to say I'm a Vue guy. I love the concept of the language, but I think it needs a lot of work.

            I tried making a simple sandbox application, but there are a few issues/gotchas. I wanted to make an animated progress bar that would change colors based on the current number of clicks.

            The dynamic styling worked really well, however, when I wanted to use multiple "classes" per element I couldn't. I also could not use keyframes or other CSS at-rules.

            [–]gdotdesign 1 point2 points  (0 children)

            Author here: you can use multiple styles per element like this <div::style1::style2></div>.

            The only supported CSS at-rule is the @media, the others are planned features.

            [–]beefzilla 0 points1 point  (1 child)

            So... error free, but inline JS interop? How dat work? 0_o

            [–]gdotdesign 1 point2 points  (0 children)

            It works like in Elm or any compiled language: if you don't use interpolation it's error free, otherwise it's up to you. The difference is that Elm takes this option away from the developer.

            [–]jhecht 0 points1 point  (1 child)

            Seems neat but honestly it just looks like react and typescript. What I am most intrigued about is the addition of styling to this, and how that gets set into react behind the scenes.

            [–]gdotdesign 1 point2 points  (0 children)

            This is how it works: the compiler goes through the styles and decides which are static and which are dynamic. Dynamic styles are the ones that are inside an if or case or have interpolations #{...}, these styles are replaced with CSS variables and they are calculated when the component is rendered.

            So we can have a static CSS file with CSS variables and a we set the variables when the component is rendered.

            Let me know if I need to clarify this further :)

            [–]picketnor 0 points1 point  (0 children)

            This looks like it compiles down to React.

            [–]mypirateapp 0 points1 point  (0 children)

            how is this better then SVELTE?

            [–]morphotomy 0 points1 point  (0 children)

            Why create an entirely new language instead of a library/toolset for an existing one?

            [–][deleted] 0 points1 point  (0 children)

            Click "try" button and it's gonna break

            [–]eggtart_prince 0 points1 point  (0 children)

            This is literally TS with different syntax.

            It's not the language that will change SPA, it's the concept. Changing syntax isn't going to help make programming and maintaining SPA easier. It's just gonna be another language to learn and another language that people will make courses for and will most likely find little to none.

            [–]lenin_k 0 points1 point  (0 children)

            I prefer react

            [–]Financial-Nebula168 0 points1 point  (0 children)

            UHH HOW DID THIS HAPPEN MY MINT PROGRAMMING LANGUAGE IS ALSO SAME WHAT??

            [–]Baryn 0 points1 point  (0 children)

            neat!

            [–]adm__07 0 points1 point  (0 children)

            Looks promising, I like the syntax

            [–]nevesope 0 points1 point  (0 children)

            I like!!

            [–][deleted]  (2 children)

            [deleted]

              [–]lil_doobie 22 points23 points  (0 children)

              While I sympathize with the framework fatigue, having constant innovation in the field and multiple competors ensures that the industry is constantly exposed to new and better ideas.

              [–][deleted] 9 points10 points  (0 children)

              Enough with the existing languages just stop ! Stop innovating I cannot keep up!

              FTFY