4 ms·
Kotlin, definitely an interesting choice for backend development. But I love to see idiosyncratic language choices being made.
by judicious 3y ago
Kotlin, definitely an interesting choice for backend development. But I love to see idiosyncratic language choices being made.
- vvpan 3y agoDoordash uses Kotlin for backend as well. I suppose they want FE/BE to be in the same language. And when your main product is a native app Kotlin starts to make sense.
- ceras 3y agoNeither the iOS app nor the web app use Kotlin at DoorDash. Kotlin was picked for other reasons (consistency with the Android app wasn't mentioned): https://doordash.engineering/2021/05/04/migrating-from-python-to-kotlin-for-our-backend-services/ https://doordash.engineering/2021/05/04/migrating-from-pytho...
- brink 3y agoHaving spent considerable time in both Java and Elixir, I would also choose Kotlin (or Java) over Elixir as a backend language. I worked in Elixir for over a year, and frankly was quite disappointed with it. Elixir has a lot of good ideas, but falls short in some crucial points in execution. Relying on shapes instead of types to identify results / objects, weird syntax choices (You use both <%= %> and {} to interpolate in phoenix templates, depending on where you are), no ability to write custom guards, a lot of language concept overlap - for example behaviors / protocols should be one implementation instead of two separate ideas.. Elixir is an okay language, but I think it's just a fad, not good enough to have staying power. I think a better language written on the BEAM will come along and be the language that Elixir should have been. Just my personal opinion.
- vvpan 3y agoThis one is quiet actively developed but it seems like by only one person https://gleam.run https://gleam.run
- benzible 3y agoTypes are coming... * https://news.ycombinator.com/item?id=36311875 https://news.ycombinator.com/item?id=36311875 * https://news.ycombinator.com/item?id=35766126 https://news.ycombinator.com/item?id=35766126 Re: "You use both <%= %> and {} to interpolate in phoenix templates, depending on where you are" - no need for EEx anymore for web development, just use HEEx, which has standardized on {}. You can use HEEx for LiveViews and "DeadViews" (server-side rendered Phoenix)
- tessierashpool 3y agoI remember when José Valim first came up with it. I thought it might just be a fad, or a toy language to test out some ideas. that was in 2012.
- davidw 3y ago> custom guards I don't recall 100%, but I think this is a BEAM feature that exists because they don't want to run arbitrary code as part of guards that could have side effects, delays and so on. I don't remember the specifics.
- el_oni 3y agoYou can write custom guards out of any built in function that can already be used in a guard. Like defguard is_list_or_even_int(val) do is_list(val) or (is_integer(val) and val % 2 ==0) end
- bostonvaulter2 3y agoSince Elixir 1.6 it is possible to create custom guards with `defguard`: https://hexdocs.pm/elixir/Kernel.html#defguard/1 https://hexdocs.pm/elixir/Kernel.html#defguard/1
- elbasti 3y agoIt's true that you can create custom guards, but they are still very limited, and they can only be made of a small list of allowed expressions [0]. [0]: https://hexdocs.pm/elixir/1.6.6/guards.html#list-of-allowed-expressions https://hexdocs.pm/elixir/1.6.6/guards.html#list-of-allowed-...
- josevalim 3y ago> Relying on shapes instead of types to identify results / objects Is the issue lack of types or relying on shapes? Those can be orthogonal features, since you can have structural typing (i.e. types that are built on top of shapes). Nominal typing is often too rigid (and not the direction we are exploring in Elixir's type system). > for example behaviors / protocols should be one implementation instead of two separate ideas Elixir has three building blocks: processes, modules, and data. Message-passing is polymorphism for processes, behaviour is polymorphism for modules, and protocol is polymorphism for data. The overlapping comes that modules in Elixir are first-class (so they can be used as data) and that data (structs) must be defined inside modules. So while maybe those features could feel closer to each other, I don't think they could be one implementation. One idea would be to treat modules/behaviors as "nullary protocols" but that's not what "nullary typeclasses" mean in Haskell, so it is quite debatable. Do you have examples of languages that do both in one implementation? For example, my understanding is that both Haskell and Go offer "protocols" but not "behaviours". I'm not aware of a language with both as one. I'd love to hear other concepts that overlap, it is always good food for thought!
- stefcoetzee 3y agoElixir creator just entered the chat ;)
- innocentoldguy 3y agoInteresting. We had the exact opposite reaction. We switched from Java to Elixir at my current company and we'll never go back. It has been a two-year migration, but worth every second. We're twice as productive in Elixir, it's easier to test and deploy, and we don't have to paint IntelliJ lipstick on the language to hide all the shitty parts.
- PhoenixReborn 3y agoIt's likely that they just chose Kotlin as "better Java" - many companies do this and I can understand why.