···55tags = ["gleam", "college"]
66---
7788-## [ ]{.nf aria-hidden=true} Picking a language
88+## Picking a language
991010Every semester my college assigns us a major project. This usually meant coming up
1111with a startup concept or designing a website in Figma, but we never got to
···2020all that work while carefully checking for every `exception` or `null` value.
2121*I wanted to try something different*
22222323-## [ ]{.nf aria-hidden=true} Enter Gleam
2323+## Enter Gleam
24242525```gleam
2626pub fn main() -> Nil {
···3232ecosystem, I wanted to give this new language a try. It's syntax is simple,
3333the community is friendly and the language is incredibly small.
34343535-### [ ]{.nf aria-hidden=true} Errors as values
3535+### Errors as values
36363737One of the main reasons why I went with Gleam was their approach to *error handling*.
3838Errors in Gleam are treated as _values_ you can return from any function.
···5757}
5858```
59596060-### [ ]{.nf aria-hidden=true} Pattern matching
6060+### Pattern matching
61616262Being able to build custom error types pairs really well with
6363Gleam's *pattern matching*. You can define it at the top level scope and easily `switch`
···7474{.tip}
7575> The compiler even _warns_ you when you're missing one or more branches!
76767777-## [ ]{.nf aria-hidden=true} Handling HTTP Requests
7777+## Handling HTTP Requests
78787979For the http server, I used [mist](https://hexdocs.pm/mist) paired
8080with [wisp](https://hexdocs.pm/wisp) for the web framework. Setting up the
···123123}
124124```
125125126126-## [ ]{.nf aria-hidden=true} Working with SQL
126126+## Working with SQL
127127128128I'm really not a fan of using regular strings to store SQL queries,
129129there's no *autocomplete*, no *syntax highlighting*, no *linting* from my editor.
···190190}
191191```
192192193193-## [ ]{.nf aria-hidden=true} Conclusion
193193+## Conclusion
194194195195This was my first time building a backend project, and if it didn't work as expected,
196196the whole group would be affected. Thankfully we ran into zero runtime errors so far,