Live data from Hacker News

Grain: A strongly-typed functional programming language for the modern web

grain-lang.org

1–10 of 156 posts

Re: Grain: A strongly-typed functional programming language for the modern web

#4
How does the example in Functions section show that function is first class citizen?

It is merely calling a function within another function. I would expect the second function to take in first function as a parameter (which JavaScript already has).

Re: Grain: A strongly-typed functional programming language for the modern web

#5
The main page doesn't do a great job of showing what's interesting about Grain vs. JavaScript. The only hint is this: "No runtime exceptions, ever. Every bit of Grain you write is thoroughly sifted for type errors, with no need for any type annotations."

Maybe show some examples of errors Grain would catch that JavaScript wouldn't, like Elm does: http://elm-lang.org/

Re: Grain: A strongly-typed functional programming language for the modern web

#6

The main page doesn't do a great job of showing what's interesting about Grain vs. JavaScript. The only hint is this: "No runtime exceptions, ever. Every bit of Grain you write is thoroughly sifted for type errors, with no need for any type annotations." Maybe show some examples of errors Grain would catch that JavaScript wouldn't, like Elm does: http://elm-lang.org/

I think the marketing page is not doing a great job. Grain is a language compiled to WebAssembly. So comparing it with either Javascript or Elm is pointless

Re: Grain: A strongly-typed functional programming language for the modern web

#9
post #3

Dart anybody?

Grain is quite different. Grain is more functional (no classes or context, tuples). Dart compiles to Javascript. Grain compiles to web assembly. Dart requires you to define types. Grain provides type safety and zero runtime errors without ever defining types manually.

Re: Grain: A strongly-typed functional programming language for the modern web

#10

The main page doesn't do a great job of showing what's interesting about Grain vs. JavaScript. The only hint is this: "No runtime exceptions, ever. Every bit of Grain you write is thoroughly sifted for type errors, with no need for any type annotations." Maybe show some examples of errors Grain would catch that JavaScript wouldn't, like Elm does: http://elm-lang.org/

I think the marketing page is not doing a great job. Grain is a language compiled to WebAssembly. So comparing it with either Javascript or Elm is pointless

> So comparing it with either Javascript or Elm is pointless

Why? They all target browsers. What else would you compare it to?

Post reply on HN