Hacker News new | past | comments | ask | show | jobs | submit login

Is Go simple?

It looks positively complex compared to Scheme.




I have a direct comparison, since I've been programming substantial amounts of code in both languages. I'd say that Go is much simpler in practice. Think about all those classical functional LISP exercises to recursively manipulate lists such as reverse a list, return the nth element, flatten lists, combine lists in various ways, and so on. I doubt you can write good Scheme code without having done those exercises at least once in your life. And at least for complete beginners these exercises are not easy.

There is no equivalent to this in the Go world. Of course, you could do it, you can do functional programming in any language. It's just not usual. Paradigmatic Go code is simple, imperative style with a lot of mutation. You only need to learn how structures and interfaces work and your good to go.


"Think about all those classical functional LISP exercises to recursively manipulate lists such as reverse a list, return the nth element, flatten lists, combine lists in various ways, and so on. I doubt you can write good Scheme code without having done those exercises at least once in your life. And at least for complete beginners these exercises are not easy."

In practice, you'd just use a library function for pretty much all of those.

Nobody writes those from scratch in Lisp or Scheme except as an exercise.

Also, once you do get the hang of it, recursion is a much simpler and more natural way of expressing many algorithms. But it too is not necessary in Lisp or Scheme, and you're welcome to write the iterative equivalent, if that's what floats your boat.

As for writing in an imperative vs functional style, I personally find the latter simpler and more reliable. But nobody forces you to write in a functional style in Lisp or Scheme. They're both multi-paradigm languages, and you can write in an imperative style in either, if you prefer.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: