4 ms·
What is the advantage of targeting go for a new language project? Could you explain about why this made sense for your project?
by readams 11y ago
What is the advantage of targeting go for a new language project? Could you explain about why this made sense for your project?
- zem 11y agoDon't know about the project's motivations, but I've been hoping for compile-to-go languages because it has an amazing cross-compiler. My use case would be to develop small apps on linux and ship self-contained binaries for other platforms effortlessly.
- jondot 11y agoThere are so many motivations for this (and so many lisp/go projects that are abandoned). This looks very promising and I hope it takes off. A few of the motivations: * A lisp with an amazing startup time * A lisp that can tap into a big and vivid ecosystem, like Clojure is tapping into Java's and its own * Cross compilation and self-contained binary (I've personally tried doing this with various lisps, and none of them really support it) * Go as a platform is improving version by version and is very performant already Another way to think of it - if only Clojure compiled to binary directly, then this would be pointless. Because chances of that happening are virtually zero, is why this project made my day. Go is the assembly language of cloud infrastructure, just as Javascript is becoming yet another "assembly" language. I believe Go is perfect for this, because it is also simple (as opposed to ES6, for example).
- hyperpape 11y ago"Go is the assembly language of cloud infrastructure" People say this about JavaScript because to run code in a browser, it has to execute as JavaScript. As a result, there are lots of actual libraries or webapps that are written in other languages and compiled to JavaScript. In contrast, you can do cloud computing in Java, C++, or various other languages. Go may have advantages, but compiling to Go would just be a choice. In short, I really don't know what you meant or why you'd say it.
- bipin_nag 11y agoJavascript would be the assembly language of web i.e. what runs on your browser. Although that won't be true with the advent of Webassembly. Go is language of choice on cloud. If you ask me following is the checklist it passes: 1. Low memory footprint/good GC 2. Concurrency (goroutines) builtin 3. Great dependency (package) management 4. Compiled/closer to bare metal 5. Fast compilation If you check other languages against the list they lack at least one of the above. If you feel any other language is better suited please tell.
- thinkpad20 11y ago> Go is language of choice on cloud. I don't think this makes any sense. Javascript is the assembly language of the web because it's the only choice for the web (or more specifically, the browser). At best, any other legitimate choice will just compile to JavaScript, which is why it's thusly named. Go has no such privileged position; it's not even clear what it would mean to be the "language of choice on the cloud." You can write cloud software in any language you want, provided that the language has libraries for networking. All of the features you list are great, but none of them are exclusive to Go, nor are they required for cloud computing.
- bipin_nag 11y agoI agree that that the statements cannot be analogues. But then I never implied it. My answer was only to counter the statement that JavaScript is the assembly language, in future WebAssembly will likely take that role. Then I continued on my intended answer of why Go is the preferred language.
- codygman 11y ago> 3. Great dependency (package) management Eh... Then why are people experimenting with vendoring? > If you check other languages against the list they lack at least one of the above. If you feel any other language is better suited please tell. Ocaml checks all of them. So does Haskell (with stack package manager), with only the low memory requirement being challengeable since many aren't used to optimizing lazy evaluation.
- rough-sea 11y agoso why not just use Go? less complexity - same benefits. you're basically saying it's somehow an advantage to program in s-expressions...
- themartorana 11y agoHave you ever talked to a Lisp enthusiast? That's said, the project states more flexibility as a goal - specifically supporting generics. Between code generation and the cross-language compiler, writing generics (but generating non-generic Go code) should be somewhat easy to reason about.
- codygman 11y agoHave you ever talked to one of the many people who write Lisp,scheme, or Clojure for real world applications and even get paid for it. There are many advantages to writing real world applications in a lisp.
- codygman 11y agoThere are many reasons using sexp's can be better than just writing Go including but not limited to: - structured editing of source code - macros (dry, dsl's, etc) - if your Go code uses interface{} everywhere you'll probably have more of an advantage using dynamic typing anyway.
- dTal 11y ago>Cross compilation and self-contained binary Did you try Chicken Scheme? $ echo "(print \"Hello, World"'!'"\")" > hello-world.scm $ csc hello-world.scm $ ./hello-world Hello, World! $ du hello-world 16 hello-world
- zem 11y agoI use chicken and it's awesome, but i dont think there's an easy way to generate windows and mac binaries from linux. go is really good for that.
- dTal 11y agoI don't know about 'easy', but it just calls GCC in the end, so anything that can be made to work with GCC can be made to work with Chicken. Apparently building Windows binaries on Linux can be done with MinGW, though I've never tried: http://www.blogcompiler.com/2010/07/11/compile-for-windows-on-linux/ http://www.blogcompiler.com/2010/07/11/compile-for-windows-o...
- olalonde 11y agoFor one, it was guaranteed to make it to HN's front page.
- IshKebab 11y agoIt does actually make a fair amount of sense. Go already has: * Fast compilation * Very very easy cross-compilation * A pretty good garbage collector * A huge library of easy-to-use libraries (they don't suffer from StringCollectorBeanFactoryProxy-syndrome) * Good concurrency support Makes sense if you ask me.