re: What are the hardest programming languages you have ever learned? VIEW POST


I actively refuse to learn languages which would have a hard syntax with no obvious benefits. I have looked at both Rust and Haskell and I decided not to learn either. I can't think into "functional" languages.

The "hardest" language I've learned so far is probably VimL. It is somewhat like Tcl, but it additional supports actually editing the buffer.


What was your issue with Rust syntax?


It has too many underscores and it doesn't support global variables.

What is a global variable, in this context, and why would one use it?

A global variable is a variable that can be read and written from everything inside your application and it is awesome for saving states. Sadly, Rust does not know the concept of "static globals".

Just initialize whatever you want to share in the main function and pass it in to where it's needed?

I'm sorry if I sound dismissive, it just really doesn't sound like a good idea.
Words like implicit dependency, side effect, singleton, and not thread safe come to mind.
Why touch something that wasn't passed into your function?

It's definitely not the same, I agree.
Can you give an example of when you'd want to use one?


I think that's a shame — both Haskell and Rust certainly made me think deeply about the way I write code in other languages, inspired me to experiment and question why I follow certain patterns.

I think there's no reason to become an expert in every paradigm, but I think there are certainly direct benefits to regularly practicing with languages which seem weird to you.

Many imperative/OOP languages are adopting functional concepts as well!


Have you tried Lisp yet? I think it provides the same advantages of Haskell without limiting you to one paradigm. Maybe that's one of the reasons as well: I already know Lisp and I use it in practice...


I don't think Haskell's syntax itself is too hard, it's more that you are used to handle things iteratively, with a main function and just running command after command exactly the way you put it.

I've taken the challenge to write a simple 'ai' for a simple game and while it was difficult it gave me an interesting look at Haskell and functional programming. Over and over again I run into situations in imperative languages where I would love to use functional aspects. I'm not trying to convince you to try Haskell, because I don't know if I'll ever use it for anything like that again, but it certainly gave me another perspective at programming.

code of conduct - report abuse