What is the best programming language to learn in 2020 and to teach others (as a trainer)?

It depends on the purpose. If you want to teach a language for the purposes of Teaching languages, then Racket is unmatched. It’s not the most useful in the Industry, but it can teach you how, well, pretty much every single other language pattern works, from dynamic to typed to procedural to functional to OOP and all. You will make someone a better programmer overall in any language by teaching them the bulk of racket and it’s patterns.

If you are going to do web-work, then I’d say Rust or Elixir, depending.

For heavy CPU work, Rust, just outright, don’t even consider C/C++ anymore.

For whatever other purpose it all depends.

But yes, for a teaching language, teach Racket.

I voted for Rust only because it’s the more overall useful, but Racket is what I’d choose as a teaching language by far, but it wasn’t an option. :wink:

And if I am getting really picky I will say there is no lisp. Clojure is not a real lisp. :smile:

Go Racket. :wink:

CommonLisp is pretty awesome overall though, it’s a kitchen-sink language by far. Can be useful to learn it instead but then you’ll be learning it’s ecosystem instead of the ‘patterns’ that Racket more focuses on. ^.^

7 Likes

So update to the poll edit request from @rvirding:

Unfortunately discourse will have an error if the poll is edited.

To fix this how about creating a new poll with more languages and i will cast my vote again.

Maybe the admins of the forum would gather all the languages discussed here and create a new poll?

Also any other ideas are welcomed.

1 Like

Thanks @OvermindDL1 or mentioning Racket, I will have a look at it and see how it feels for me.

1 Like

i never use Rust because of :

  1. slow compile time
  2. cargo is just like npm, use actix, and check du -h . --max-depth=0 on your project directory
  3. there is no compelling reason yet to use Rust

and my boss doesn’t care what language I use, he just wants the product to be finished quickly & stable, so Python+MongoDB is great fit for me (or for anyone who want RAD)

but maybe i will use Rust for banking* application

3 Likes

Thanks for sharing your experience @jihantoro

This would be a good question for a community survey. Looks like there hasn’t been one since 2017. Official Yearly Elixir Users Survey?

It could be cool if EEF ran a beam wide survey.

4 Likes

UPDATE IMPORTANT:
Thanks to the wonderful team of admins of the site the following solution emerged:

To solve the missing languages request by @rvirding. We can only create a new poll with more languages and all the users will have to cast the vote again in it.

What does everyone think about this suggestion?

Also write more languages that you want to be added too the new poll.

Thanks in advance everyone for understanding the situation.

1 Like

Rust is indeed not for everybody. It’s looks to be aimed at dethroning C++ mostly. A lot of tasks can be done just fine in a lot of scripting languages and/or more focused-purpose dynamic languages like Erlang/Elixir.

I am currently exercising importing different public datasets into a DB with Elixir and will soon get to Rust to see if there’s any meaningful speed difference. But I am 90% sure that the true bottleneck will be the DB speed and not the language (especially Elixir; during my mostly amateur performance measurements I think I established that Elixir’s overhead in such loads is like 0.1% - 1.0%).

I don’t think it’s necessary. ElixirForum is not that big and making a poll with a huge number of languages won’t achieve much – IMO. Feel free to do it anyway if you feel like it, I am sure people will participate. :slight_smile:

1 Like
  1. Faster than C++, which is what Rust is bent on replacing
  2. Cargo is significantly better designed than npm, especially the immutable crates server.
    Hmm, let’s try that command though:
    ➜ du -h . --max-depth=0
    29M     .
    
    Seems like no issue. Let’s try running it on a massive library that depends on a couple hundred other things (a game engine, Amethyst):
    ➜ du -h . --max-depth=0
    4.4G    .
    
    That’s the smallest binary object set I’ve ever seen for a large game library!
    So… I’m not sure what you are referencing?
  3. Rust is extremely compelling, I’m not sure how you could possible say otherwise! It has safe generic resource handling, it’s as fast or faster than C++, it has aliasing guarantees, it’s UB safe as long as you don’t touch unsafe (which you shouldn’t), etc… etc…

Yeah by far Rust wouldn’t replace something for fast iteration that doesn’t need it’s speed. Rust is extremely useful to a lot of people, like me writing drivers or embedded chips in my house.

Yeah DB tuning I bit will give the best boost, especially with streaming the large dataset to it.

2 Likes

Don’t make a new poll. People will just get irritated and probably won’t be bothered to fill it in again.

We will just have to accept that some of the elixir votes are actually for erlang. :wink:

9 Likes

Thanks for understanding the situation @rvirding

I think I cheated and voted for three; Elixir, Rust and, Python. Elixir well because it’s what I love to be in the majority of the time. Rust because it peeks my interest more than any other language outside of Elixir. Python for the simple fact all A.I. work seems to be using Python.

2 Likes

Hi,

@dikaio you haven’t cheated the poll was created so you could choose multiple languages. at some point in the forum threads there was one that mentioned, that developers are polyglot programmers and i believe this statement to be true.

Thanks for the vote and explanations

1 Like

You may want to check out zig.

I would recommend Nim for new programmers because:

  1. It’s a typed language
  2. It’s low level without being too low level - it’s more C# than Ruby, does that make sense?
  3. It’s fast.
  4. Compiles to small static binaries so people can ship their toy projects easily.
  5. Extremely low memory usage.
  6. Not insurmountable like Rust is. I mean look at this syntax, it’s atrocious.
use actix_web::{web, App, HttpRequest, HttpServer, Responder};

async fn greet(req: HttpRequest) -> impl Responder {
    let name = req.match_info().get("name").unwrap_or("World");
    format!("Hello {}!", &name)
}

#[actix_rt::main]
async fn main() -> std::io::Result<()> {
    HttpServer::new(|| {
        App::new()
            .route("/", web::get().to(greet))
            .route("/{name}", web::get().to(greet))
    })
    .bind("127.0.0.1:8000")?
    .run()
    .await
}

Sure you can understand it, but imagine writing this day in day out? I’m not seeing the fun factor for me there.

2 Likes

I looked at Nim and it has a nice documentations plus books that really show how the language can be used. I will have to dig deeper in it. But one thing that doesn’t have is OTP and that’s the future.
Fault tolerant applications are vital to save money and lives.(when I say lives i refer to software for example that monitors a nuclear power-plant or a dam)

Thanks @sergio for you opinion and explanations.

1 Like

Sure it’s the future, but then again a single server with a single Nim binary can handle hundreds of thousands of requests per second. Pick the right tools for the right job, at worst you learn something very useful in-case-of.

1 Like

Interesting will have to learn more about it,

Thanks for the follow up @sergio

I am started learning functional programming with node.js and Scala, and now I switched to Elixir, and I am shocked how cool and clear it is!

I’ll not write on the Elixir forum why I like Elixir, and why people need to learn it, better I will share my experience with other languages.

node.js
The problem with functional programming on node.js that to need to use a lot of dependencies for this, like Fluture as promises alternatives Ramda, Sanctuary, fp-ts, and so on and so four. In the end, the code turns out to be rather cumbersome and still cannot achieve the same effect as on Elixir.

However, Javascript is useful to any developer sooner or later; Therefore, I do not regret this experience, and it is was a good choice that I started precisely from that language. It an excellent language to start with functional programming, mainly because there was a lot of material that explains algebraic structures well. (DR.boolean was very helpful for me).

Scala
In my opinion, Scala same problem as with node.js; there are less that works nicely out of the box, mainly I talking about concurrency usually, it is libraries like with a high entry threshold like Akka.

But mainly I do not like what 90% of programmers on Scala write OOP code, which is hard to read for me; moreover, I believe that F.P. almost always a better approach. Exactly this prompted me to switch Scala on Elixir.

However, experience from the Scala also helped me to get comfortable with the Elixir.

Briefly
JS is a good language to start with Functional Programming. However, at some point, your head may begin to burst from the number of libraries you may need; it is at this moment that it will be ideal if you switch to some language like Elixir.

I happy that I am on Elixir now; the feelings are like I switch my Windows P.C. to Mac …I hope I do not unleash the holy war with this comparison :)))

P.S. This is my first post here.

2 Likes