Yeah, good luck managing large projects without inferred types for your Ecto queries, which would provide IntelliSense hints. It's hard to imagine working without something as basic as this. In TypeScript, I can simply define my endpoint with tRPC: export const user = t.router({ getByEmail: p .input( z.object({ name: z.string(), }) ).query( () => db .select({ id, email, // a few dozen other properties }) .from(data_users) ) }); And just like that, everything is automatically typed both in the frontend and the backend. For example: const users = await trpc().user.getByEmail.query({ name: "test" }); // users. After typing the dot, I immediately see a list of properties selected by the query. I don't need to double-check what is returned by that endpoint. Moreover, if I tried to pass incorrect arguments, like `name: 321`, I'd get an error not only at compilation time but immediately in the editor. There's no need to even define my types, as everything is derived directly from the ORM schema and the queries. Can you achieve anything even remotely as convenient in Elixir? No. You need to check everything manually. For goodness sake, you don't don't even know what's inside your live view's state object (i.e. the socket assigns)! It's as far from "delightful" as you can possibly get, and I can't comprehend how anyone could possibly enjoy this.
@@anatolydyatlov963 I like types too. Although I don't think you should discount dynamic languages entirely - I've worked in large projects with both, and there are tradeoffs (as with almost anything worth discussing). When I said 'delightful DX' I was referring to the fact that the front/back end distinction seems to melt away with LiveView (at least conceptually for the developer). That's what's appealing to me. I'd love to see LiveView get typed with Elixir's in-progress type system, or perhaps to see a LiveView-like in Gleam (a typed BEAM language).
This woman is easily one of if not the best communicator in the Elixir community. I'll be on the lookout for more of her content. I have the feeling I'm going to learn a lot and really fast
Excellent speaker, very enjoyable to listen to. I'm increasingly interested in LiveView, it looks like a delightful developer experience.
Yeah, good luck managing large projects without inferred types for your Ecto queries, which would provide IntelliSense hints. It's hard to imagine working without something as basic as this. In TypeScript, I can simply define my endpoint with tRPC:
export const user = t.router({
getByEmail: p
.input(
z.object({
name: z.string(),
})
).query(
() => db
.select({
id,
email,
// a few dozen other properties
})
.from(data_users)
)
});
And just like that, everything is automatically typed both in the frontend and the backend. For example:
const users = await trpc().user.getByEmail.query({ name: "test" });
// users.
After typing the dot, I immediately see a list of properties selected by the query. I don't need to double-check what is returned by that endpoint. Moreover, if I tried to pass incorrect arguments, like `name: 321`, I'd get an error not only at compilation time but immediately in the editor.
There's no need to even define my types, as everything is derived directly from the ORM schema and the queries. Can you achieve anything even remotely as convenient in Elixir? No. You need to check everything manually. For goodness sake, you don't don't even know what's inside your live view's state object (i.e. the socket assigns)! It's as far from "delightful" as you can possibly get, and I can't comprehend how anyone could possibly enjoy this.
@@anatolydyatlov963 I like types too. Although I don't think you should discount dynamic languages entirely - I've worked in large projects with both, and there are tradeoffs (as with almost anything worth discussing).
When I said 'delightful DX' I was referring to the fact that the front/back end distinction seems to melt away with LiveView (at least conceptually for the developer). That's what's appealing to me.
I'd love to see LiveView get typed with Elixir's in-progress type system, or perhaps to see a LiveView-like in Gleam (a typed BEAM language).
@@anatolydyatlov963 Real programmers don't require LSPs to code.
This woman is easily one of if not the best communicator in the Elixir community. I'll be on the lookout for more of her content. I have the feeling I'm going to learn a lot and really fast
I bought her book 2 days ago and this is really amazing. I cannot stop to read it.
Any time I see Sophie's name, I know it's going to be a legit Elixir resource, be it article or whatever. Thank you!!!