HN user

lamg

60 karma

Sub specie aeternitatis

Posts15
Comments13
View on HN

"playground of rich Americans": certainly a fallacious reduction of Cuban history. "The America gov't instituted an embargo. Being in the tropics, the electric signs broke down": you're seriously underestimating the destructive force of communism. osmay88: thanks!.

Certainly is hard to read nested code, but returning earlier makes it harder because now our mind has to construct the execution path instead of reading it. What I usually do is writing the body in a new procedure. Dijkstra designed a language with no return statement with a very simple semantics made for proving the program behaves exactly as its specification mandates. Niklaus Wirth designed Oberon with no return statement. Currently I write Go code only using return at the end of the procedure, my code is easy to follow and I have fewer errors than before https://en.wikipedia.org/wiki/Guarded_Command_Language https://www.inf.ethz.ch/personal/wirth/ProjectOberon/index.h...

Certainly is hard to read nested code, but returning earlier makes it harder because now our mind has to construct the execution path instead of reading it. What I usually do is writing the body in a new procedure. Dijkstra designed a language with no return statement with a very simple semantics made for proving the program behaves exactly as its specification mandates. Niklaus Wirth designed Oberon with no return statement. Currently I write Go code only using return at the end of the procedure, my code is easy to follow and has fewer errors than before https://en.wikipedia.org/wiki/Guarded_Command_Language https://www.inf.ethz.ch/personal/wirth/ProjectOberon/index.h...

Looking at your known languages my advice is: * don´t make a world of objects and patterns (the gang ...). These stuff is advanced and you should be careful, there is no magic to solve all your problems. * KISS principle * do some data driven programming

Just read a book like Practical Common Lisp, Land of Lisp or Learn Haskell for the greater good, you will learn how to do some interesting programs and you vision of side effects will change. I am trying out Go now, it is really nice too, if you want to read some code check out http://github.com/lamg/md2sexp, it is really easy to understand (but it does not work yet).

Two years ago I felt just like you. It is overwhelming, there is a lot of people talking about the best approach, the best technology .... Don´t hear that, I am sure there is nice stuff around there, but what makes the difference is you. Thinking about programs is a nice advice, try to see things from different points of view. A year ago I did some hacking in Common Lisp and Haskell, that certainly changed my way of thinking. Now I am more interested in making things simple, I am hacking in Go now and trying out Plan 9, is really rewarding reading real world programs that are easy to understand.