Live data from Hacker News

Svelte is the most beautiful web framework I've seen

thefutureoftheweb.com

11–20 of 210 posts

Re: Svelte is the most beautiful web framework I've seen

#11
post #5
post #3

Earlier quoted context omitted.

Agreed, JSX/TSX feels so incredibly natural it's hard to imagine giving it up, and starting a significant JS project in 2019 or 2020 without using TypeScript would feel professionally negligent to me.

Using JS ternaries for conditional rendering doesn't feel natural to me at all

You don't have to, you can create a simple 1 line component to turn it into a declarative style.

It's the benefit of having a full language instead of a template DSL for rendering. Declarative syntax is easy inside of an imperative flow, doing the opposite tends to lead to problems though.

Re: Svelte is the most beautiful web framework I've seen

#12
post #5
post #3

Earlier quoted context omitted.

Agreed, JSX/TSX feels so incredibly natural it's hard to imagine giving it up, and starting a significant JS project in 2019 or 2020 without using TypeScript would feel professionally negligent to me.

Using JS ternaries for conditional rendering doesn't feel natural to me at all

You don't have to. The beauty of it being a simple JS function is you have flexibility.

  function FileList() {
    if (!files.length) {
      return ;
    }
    return ;
  }

  function FileList() {
    return files.length
      ? 
      : ;
  }

What feels unnatural is the syntax that these templates pull out of thin air to do things the language can already do. Why should I need to learn another syntax just for templates?

Re: Svelte is the most beautiful web framework I've seen

#13
post #9

Svelte is so great... so were react, angular, ember, meteor, and vue. I'm sorry, but I've got trouble seeing how having one more framework to learn is going to help any thing. There's a webcomic of some sort to which I can't find the link, which talks about this. Some one is sick of the bloat of x framework/tool/whatever, and decides to build it better. He works hard, and finally version 1.0 is released to dramatic m…

It's just more options. Svelte is new in that it actually compiles the components and logic into plain low-level JS code instead of having a "runtime".

It's something most of these frameworks should have already done by now considering they need build steps but maybe it needed a new project to make it happen. It's a brand new release though so it'll take more time for uptake, and by people who think the opposite of what you typed.

Re: Svelte is the most beautiful web framework I've seen

#16
post #5
post #3

Earlier quoted context omitted.

Agreed, JSX/TSX feels so incredibly natural it's hard to imagine giving it up, and starting a significant JS project in 2019 or 2020 without using TypeScript would feel professionally negligent to me.

Using JS ternaries for conditional rendering doesn't feel natural to me at all

Using {#if} or v-if or whatever feels even less natural -- especially when these template languages are hyped as being "logicless".

Re: Svelte is the most beautiful web framework I've seen

#17
post #9

Svelte is so great... so were react, angular, ember, meteor, and vue. I'm sorry, but I've got trouble seeing how having one more framework to learn is going to help any thing. There's a webcomic of some sort to which I can't find the link, which talks about this. Some one is sick of the bloat of x framework/tool/whatever, and decides to build it better. He works hard, and finally version 1.0 is released to dramatic m…

It's just more options. Svelte is new in that it actually compiles the components and logic into plain low-level JS code instead of having a "runtime". It's something most of these frameworks should have already done by now considering they need build steps but maybe it needed a new project to make it happen. It's a brand new release though so it'll take more time for uptake, and by people who think the opposite of w…

You're right that it's more options, but it's also one more box a "competent JS dev" is expected to tick. One of the best and worst things about the JS ecosystem is the plethora of choices available.

On compilation, nope. Riot.js did it first, and this is literally the entire premise of typescript (I know typescript is a different language, but I see little difference here as it can mix with JS between writing only some stuff in TS).

You're right, they probably should have done it, and I'm excited to see it. But I also don't see why they couldn't have submitted a PR to react/angular/ember/meteor/vue.

Re: Svelte is the most beautiful web framework I've seen

#18
post #10
post #5

Earlier quoted context omitted.

Using JS ternaries for conditional rendering doesn't feel natural to me at all

Ok, I should probably edit my comment to "JSX/TSX feels so incredibly natural except for needing to use JS ternaries for conditional rendering" because seriously what were they thinking there?

This is more of an issue with JS than React. ReasonML also has JSX support and since `if` is an expression rather than a statement you can do this:

    
      {if (cond) {
        
      } else {
        
      }}
    
Or even:

    
      {switch (expr) {
      | A => 
      | B => 
      | _ => 
      }}
    

Re: Svelte is the most beautiful web framework I've seen

#19
post #8

I like playing with different web frameworks, but the article had a bad hype:information ratio, so I googled the Svelte homepage, which I think is really well presented: https://svelte.dev/

I get a 404

The site is hosted on Google Cloud Run, which seems to have been having some intermittent problems for the last couple of days. EDIT: some other people have had the same issue and the Cloud Run team are investigating
Post reply on HN