News for hackers. Stuff that matters.
Re:Grain: A strongly-typed functional programming language f... by FractalHQ on Saturday April 24, 2021 @12:53PM (#26926332)
Once I finally found some code examples, all I saw was JavaScript with print instead of console.log. Doesn’t AssemblyScript already compile Typescript to web assembly?
Re:Grain: A strongly-typed functional programming language f... by cies on Sunday April 25, 2021 @07:29AM (#26931941)
Look better. Dont be fooled by syntax. Learn about sum types, pattern matching, strong typing guarantees. Then look again.
Re:Grain: A strongly-typed functional programming language f... by 0x11 on Sunday April 25, 2021 @10:08AM (#26932795)
But doesn't typescript provide all that?
Re:Grain: A strongly-typed functional programming language f... by seanclayton on Monday April 26, 2021 @01:24AM (#26939464)
Typescript provided none of those besides sum types.
Re:Grain: A strongly-typed functional programming language f... by cies on Monday April 26, 2021 @03:39AM (#26940242)
and sum types bolted on, it something else from sum types that are idiomatic and used throughout all of the std lib.

that's my main gripe with TS: it's bolted on nature.

that's why I prefer a clean slate (like Elm, Rust, F#/Fable, ReasonML/ReScript, PureScript, or this "Grain" project)