3 ms·
I am now sure if I can put it into words, but here are some comparisons: - In Scheme/Lisp, you write the function name before the opening parenthesis. In langu
by JepZ 10y ago
I am now sure if I can put it into words, but here are some comparisons:
- In Scheme/Lisp, you write the function name before the opening parenthesis. In languages related to C, you write the function name before. For me, the second one feels better. In general, I like the C syntax pretty much.
- In C++ you easily provoke very long compiler error messages. Go compiler messages are much shorter and much more to the point. I like the ones where I do not have to search the real error in the error messages themselves. (I heard Rust compiler error messages are even better).
- To run a go program on a computer you just need the binary, done. To compile a program you need the compiler which comes with a few cli tools, done. For java, you have to decide if you need the JRE or JDK, agree to some license before being allowed to download it from their website. In addition, you have to place the jre on every computer which should run your program. I like the simple way.
- When I design a program there are a few parts. One is the Entity Relationship Model. Sometimes I think about it as something that has to be saved to an SQL database, sometimes as an object oriented inheritance hierarchy. For both there are reasons, but even simpler is it to just think about it as a struct or JSON. This fits pretty good for designing JS and go apps.
- When I write bash script I know what a slow language feels like. I know there are faster languages than go (e.g. fortran), but I am also aware that much of the performance is in the hand of the developer (e.g. memory management). When I write go programs I feel like my efforts to make the program efficient are worth my time and the tools support me while doing so.
- Last but not least go supports then functional programming style when needed. I like that. Sometimes I miss object orientation a little, but that mostly happens when I forget what interfaces are for. And while I truly respect Alan Kay I think object orientation has been overused/misused enough, so that its ok for me, that go didn't build it into the language.
So maybe I just like 'simple'. I am sure, that for every example I listed you can find a language which does even better than go, but I think it becomes harder when you consider all examples together. Nonetheless, the list is far from complete, I just tried to write down out of my head, what I like about go.
- lispm 10y ago> In Scheme/Lisp, you write the function name before the opening parenthesis after > the second one feels better Not really. Parentheses makes code manipulation easy. Thus it actually it FEELS better, though it may not LOOK better.
- JepZ 10y agoI hope you realize that you are arguing against an explicitly subjective statement. Nevertheless, please elaborate. What do YOU think is the difference here between feeling and looking? Do you mean that your favorite editor (or the majority of editors) better supports outside parenthesis?
- kazinator 10y agoEven original Vi from AT&T Unix (never mind Vim) better supports outside parentheses: If the cursor is here (foo bar) ^ I can cut the whole thing using just d%: combine d)eletion with the % cursor movement (jump to opposite parenthesis). Then you can paste it elsewhere with p. It's a POSIX-standard feature: see here: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/vi.html#tag_20_152_13_21 http://pubs.opengroup.org/onlinepubs/9699919799/utilities/vi... That's just a crap editor for sysadmin tasks I wouldn't use for development. If the syntax is: foo(bar) ^ then we jump only over the argument list, not the whole expression. Another thing is the damned comma disesase in f(x, y) languages. Say we are in Vi: (foo abc def ghi) ^ We want to swap the last two parameters. Easy: type deep. Done! d)elete to e)nd of word, go to e)nd of word, p)aste. Now try it with foo(abc, def, ghi) ^ Annoying! Imagine if your operating system shell forced you to use commas between command line arguments. Nobody would use such an idiotic thing. Why do we put up with languages that do that? $ ls, -l, *.foo # just kill me now Move second argument to third position: "parens outside" together with "no commas between arguments" makes it a breeze: (foo (a b c) (d e f) (g h i) (j k)) ^ Instead of deep we just do d%%p. Done. (foo (a b c) (g h i) (j k)) ^ d% (foo (a b c) (g h i) (j k)) ^ d%% (foo (a b c) (g h i) (d e f) (j k)) ^ d%%p
- JepZ 10y agoThank you very much for your explanation, I see your point. I think I will still prefer the C style for parenthesis (as I would care more for the LOOK than for the FEEL ;-), but regarding the commas, I agree that skipping them would make the life a easier. I mean besides lisp and bash/shell other languages have done so too (e.g. Smalltalk) and spaces aren't allowed anyway inside parameter names.