Building a hybrid native application with Gleam and Tauri
1–10 of 20 posts
Re: Building a hybrid native application with Gleam and Tauri
#2Re: Building a hybrid native application with Gleam and Tauri
#3Re: Building a hybrid native application with Gleam and Tauri
#4Heads up, the link to the code repository at the top of the post 404d for me.
Re: Building a hybrid native application with Gleam and Tauri
#5As a mostly frontend dev I feel it’s worth mentioning that while it’s a nice way to try Gleam, the Gleam aspect of this is inessential, TypeScript is quite good, and using create-tauri-app with the react-ts, vue-ts, or svelte-ts preset is also a great way to try making cross-platform GUIs with Tauri. It uses Vite under the hood, and the generated app is extremely minimal — nothing like the awful create-react-app behemoths that probably left a bad taste in everyone’s mouth.
Re: Building a hybrid native application with Gleam and Tauri
#6Re: Building a hybrid native application with Gleam and Tauri
#7Recently learned about Gleam and am very interested in it as someone who always wanted to like Elixir but dislikes the Ruby syntax and lack of static typing. Love this approach to demonstrating the language in context. As a mostly frontend dev I feel it’s worth mentioning that while it’s a nice way to try Gleam, the Gleam aspect of this is inessential, TypeScript is quite good, and using create-tauri-app with the rea…
TypeScript can be quite productive but I find its type system lacking. Specifically the use of structural typing/lack of nominal typing and lack of sum types. I find these extremely useful when writing reliable software, which is why Gleam appeals to me.
Re: Building a hybrid native application with Gleam and Tauri
#8Recently learned about Gleam and am very interested in it as someone who always wanted to like Elixir but dislikes the Ruby syntax and lack of static typing. Love this approach to demonstrating the language in context. As a mostly frontend dev I feel it’s worth mentioning that while it’s a nice way to try Gleam, the Gleam aspect of this is inessential, TypeScript is quite good, and using create-tauri-app with the rea…
> the Gleam aspect of this is inessential, TypeScript is quite good TypeScript can be quite productive but I find its type system lacking. Specifically the use of structural typing/lack of nominal typing and lack of sum types. I find these extremely useful when writing reliable software, which is why Gleam appeals to me.
Re: Building a hybrid native application with Gleam and Tauri
#9Earlier quoted context omitted.
> the Gleam aspect of this is inessential, TypeScript is quite good TypeScript can be quite productive but I find its type system lacking. Specifically the use of structural typing/lack of nominal typing and lack of sum types. I find these extremely useful when writing reliable software, which is why Gleam appeals to me.
It has sum types! Type unions with a discriminator.
Edit: lots of replies showing how TypeScript can be made to do exhaustiveness checking. It's neat and all but it's a lot of gymnastics compared to languages that just have this built in, which again is part of the appeal of Gleam for me.
Re: Building a hybrid native application with Gleam and Tauri
#10Earlier quoted context omitted.
It has sum types! Type unions with a discriminator.
It kinda does if https://www.typescriptlang.org/play#example/discriminate-typ... is what you're referring to but it appears to be missing one of the major benefits: an error/warning if you haven't handled all variants. Edit: lots of replies showing how TypeScript can be made to do exhaustiveness checking. It's neat and all but it's a lot of gymnastics compared to languages that just have this built in, which again is…
function expectType() {}
expectType();
The function call will fail at compile time if yourUnion is anything more than never, which you can use in your else case of if statements that narrow the discriminated union.