10
neeno
52d

I'm just frustrated. I wanted a simple, statically-typed language that doesn't get in your way and offers GC. I can't find anything "just perfect".

- Go: enforces a style on you, nono.
- Rust: ownership system. I love it, but it's too low level for what I want.
- Scala: seems to have a bunch of useless and bug-prone features.
- Java: I hate how you have to declare and catch exceptions. Good practice, yes, but the code gets bloated with try-catch statements.
- C and C++: Too low level, no GC.
- C#: maybe? idk

I want to make a back-end for an app but I want it to be easy and fast. I need something with a gentle learning curve, not keep fighting the language. I'm between Java and Rust. Java's easier to use. Rust is rust <3, but it's hard, I haven't learned it properly and I just keep fighting the fucking compiler.

Comments
  • 4
    Crystal?
  • 5
    how about Elixir?
    https://elixir-lang.org/

    It's staticly typed and was developed from Erlang. A language that was developed by Ericson to handle thousends of concurrent cellphone connections in cellphone towers.

    Elixir and Phoenix are an adaption to the web and app needs of today and is a good fit for high trafic.
  • 7
    What is the attraction of GC? In C++ you use RAII and you don't need GC. There are libraries to add GC if you really want it. Also, C++ can be abstracted to any level you might want. Or you can go with a set of libraries from Qt and/or boost (and many others).

    Qt has its own memory management as well.
  • 5
    If your main beef with Java is checked exceptions but you like it otherwise - give Kotlin a serious look.

    It's basically "Java 2.0". No checked exceptions to deal with, and a bunch of other very nice, useful features as well - a much more modern language in general.
  • 1
    @molaram @heyheni ooh these look good. I will take a look at them, thank you.

    @Demolishun I want to focus on my backend's functionality and not worry about memory. Also, using a GC lib seems too much of a hassle, especially for someone that doesn't know C or C++ very well.

    @AlmondSauce Oooh I forgot about kotlin. I'll check it out, thanks!
  • 1
    I was also looking at vlang, looks like it's exactly what I want, but doesn't have many packages.
  • 0
    Whats the issue with scala exactly? Its not like the other languages on the list, i might be able to help with that.

    Edit: also heres a really simple scala backend app i made, i dont think you can use any of the other ones this easily https://github.com/RazorSh4rk/...
  • 1
    @neeno vlang promises a lot and it's demo apps are stunningly small in filesize but that's about it at the moment.

    Also the inventor of node.js just released the first stable version of deno.js a successor of node.
    https://deno.land/v1
    It uses typescript and has many improvements from lessons learned from node js. And knowing JavaScript is always handy especially if you work with others.
  • 3
    however if your a webdev who knows elixir you can expect to land high paying jobs from around the world.
    As it's usually big companies are in need of high traffic systems and thus are willing to pay premium for elixir devs.

    Think Discord chat how many million people send and receive messeges simultaneously. All done by elixir.
  • 12
    The reality is closer to "choose one"
  • 1
    @yellow-dog taking a look at the tour screamed at me "pretty features that'll lead you to bugs". Return is rarely used, making the last expression of the function be the return value, might be easier to miss than a regular return. Two sets of parentheses for a function that returns another function. I like the idea but my gut tells me people overuse it and that just makes stuff harder to understand. I don't like judging the language before trying it out, but I also don't want to invest a lot of time in it to later think "this is garbage".

    Thanks for the example, I'll take a look later when I'm at the computer.

    I think I'll develop a simple application in many languages to figure out the quirks of each one and then decide what to use.
  • 1
    @heyheni typescript? Idk... Never used it though so I might give it a try before judging it.

    Also, the thing about landing high paying jobs with elixir is a great incentive 😅, though my application doesn't need that much performance.
  • 2
    @neeno
    Typescript is a good option, but it will generally come with the baggage of js frameworks.
  • 0
    @SortOfTested yeah... That's what I don't really like about it. I made a full backend for an app in node, all I've learned is to stay away from it.
  • 0
    @neeno oooh. You dont use functional programming, do you. Functions dont return anything. They evaluate themselves.

    When you say
    def a() { 0 }
    that means
    val a = () => 0
  • 1
    @neeno challenge: build a backend for every language mentioned here for the same frontend 😄

    let's add clojure to mix a lisp variety language 🥴
    https://clojurescript.org/
    ClojureScript
  • 3
    @neeno you want D (the language).
  • 1
    @yellow-dog noo I don't 😂

    Would you mind explaining how's that different from object-oriented languages? To me it looks like JavaScript, functions are just special objects.
  • 1
    @heyheni you underestimate me... I actually like that idea. Dipping my toes in many languages, see what I like.
  • 0
    @RememberMe lemme take a look at that D
  • 1
    @neeno somewhat unrelated but do you know and have used graphQL?
    www.graphql.com
  • 1
    @heyheni yes and I expect to use it, looks fucking awesome. Why you ask?

    EDIT: ah, no. I don't have experience with it yet. I read your comment too fast XD
  • 2
    @yellow-dog how lost am I going to be if I try to pick that up without the slightest bit of knowledge on java? It looks like it would be really pleasant to work with.
  • 2
    @neeno i'm just a graphQL fanboy 🙃
  • 2
    @neeno basically everything is a function. A value (not variable) is just a function that evaluates to 3 or something.
    Values are immutable, you can change them in place but thats gonna give you nasty bugs.
    Obejcts are actually either functors or monads, you can just use them as normal oop, they will behave nicely.
    Instead of loops, you will want to tabulate a list of n elements and use method chains.

    Other than that, scala is probably the most friendly fp language you can start with, it eases you away from normal oop slowly.

    @M1sf3t eh, if you know how design patterns work generally, id say its a 6/10 on difficulty scale to get started.
  • 1
    @yellow-dog I'll look into it. This seems veeery different from what I'm used so I'm guessing it'll be a bumpy ride, but I always wanted to try fp, let's see how it goes. Thank you
  • 0
    @yellow-dog i know of them, I wouldn't say I know them well. I've taken to them quite a bit here lately when writing js though, that's why I was curious.

    I still like oop for some things concerning visualizations but for general purpose and readability, functional seems to be ideal.
  • 4
    I would strongly recommend to take the time to really learn Rust. Once you get the hang of ownership and lifetimes it's just as terse and beautiful as a very high level language with the performance of a system language

    I wouldn't think twice about writing even front-end web apps in Rust. I'm dead serious
  • 1
    You could try Deno, it just came out.
  • 1
    I totally agree. How about Swift?
    There’s IBM Kitura, Vapor, and Perfect as back-end webby frameworks. + Apple goes all in with officia cross platforming.
  • 1
  • 0
    @yellow-dog "jó név" ~> "[at]faszom Good nickname" 😅 Thanks amigo! Worths a +1?
  • 1
  • 0
    Typescript + node.js?
  • 0
  • 1
    If .NET is not a no-no for you (given that .NET Core is open source, it should be all right), have a look at F#. Otherwise, check out OCaml, which is F#'s spiritual predecessor, and usable for both native development, and for web development via BuckleScript and/or js_of_ocaml. Also, if you don't like the syntax, there is ReasonML, which is basically an alternative syntax for OCaml.
  • 2
    @neeno so the challenge is on we are at the 17 languages mentioned mark here. You rather start now building those 17 backend versions of your app.

    😄 imagine your medium post title.
    *How i build 17 backends for my app in 17 days in 17 different languages.*
  • 2
    @heyheni Hold my beer! 🤣
  • 1
    Try Kotlin
  • 1
    @heyheni dude I really like that idea. Not one per day but testing out a bunch of languages? I like that. I just have to figure out a backend app that isn't too big and can test important aspects of each language...

    The challenge is on!

    @SomeNone thanks, I'll take a look at those!
  • 1
    @SomeNone i wouldnt recommend ocaml to someone with no prior fp experience tbh
  • 1
    @neeno Fair enough. It is good to know what you want and don't want.
Add Comment