Sky – an Elm-inspired language that compiles to Go

whalesalad 148 points 53 comments April 06, 2026
github.com · View on Hacker News

Discussion Highlights (19 comments)

zem

at first glance this looks amazing! basically provides everything I have ever wanted in a full stack language. looking forward to experimenting with it. edit: looking through the docs/examples some more, it looks like javascript interop is fairly clunky, both because it relies on string concatenation to embed fragments of javascript, and because the string concatenation syntax is not great (and the formatter makes it even worse - see the example at https://github.com/anzellai/sky/blob/main/examples/13-skysho... ) I would encourage you to at the least add multiline strings with interpolation support, and ideally add a small compiler for html literals.

riclib

Can’t wait to play with it. Great design!

skybrian

Functional languages have some good and some bad features and there's no reason to copy them all. For example, you don't need to have a Hindley-Milner type system (bidirectional is better) or currying just because it's a functional language.

melodyogonna

That's two new languages compiling to Go making HN frontpage in as many days. It seems people like everything about Go except the language itself. Me? I like everything about Go including the language, these transpiled languages are interesting though. But I keep wondering if they could integrate at a lower-level than the source code. Like how JVM languages integrate at the bytecode level, or LLVM languages at the LLVM level

tasuki

A bit too bleeding edge for me, but it does look super nice (ie exactly like Elm).

redoh

Elm's type system and architecture are genuinely pleasant to work with, so seeing those ideas ported to a Go compilation target is interesting. You get the safety and expressiveness of Elm but end up with a Go binary you can deploy anywhere. I wonder how the error messages compare, since that was always one of Elm's strongest features.

submain

Great work :). Go doesn't have TCO. That means functional languages (no for loops) could blow up the stack. How did you solve that?

1-more

I will add this to my list of Elm-inspired tools that call to mind Brian Eno's quip about the first Velvet Underground album: "I think everyone who bought one of those 30,000 copies started a band!" With Elm it feels like it's 1% of Elm users creating a language. https://quoteinvestigator.com/2016/03/01/velvet/

onlyrealcuzzo

First - awesome job. Congrats. Self hosting is an accomplishment! But I'm curious to get your thoughts on the process in hindsight. I understand why it's valuable: to cast a wide net in catching bugs and give a good signal that your language is generally "ready". I'm working on a similar language, but worried about going down the self-hosting path, as I think it'd slow me down rather than speed me up. How did it work for you?

harikb

Somewhat unrelated to the language itself: > The compiler bootstraps through 3+ generations of self-compilation. I guess it applies to any language compiler, but f you are self-hosting, you will naturally release binary packages. Please make sure you have enough support behind the project to setup secure build pipeline. As a user, we will never be able to see something even one nesting-level up.

mrichman

Compiles to Go or transpiles to Go?

__natty__

I would love to see Java inspired language compiled to Go. I really like Go portability and standard library and Java... verbosity. I prefer explicit names, types and all the syntax around that. Graalvm is not an answer for me because as far as I'm aware it doesn't support cross-compile.

ch4s3

If you allow FFI are you really inspired by Elm? ;)

librasteve

Very cool. I am comparing this https://github.com/anzellai/sky#tea-architecture with this https://harcstack.org (my thing) ... guess I have some work to do ;-)

taolson

Nice to see another language with Haskell / Miranda type syntax, but the vibe-coded implementation sure shows: e.g. src/Compiler/Infer.sky isUpperStart: isUpperStart : String -> Bool isUpperStart name = case String.slice 0 1 name of "A" -> True "B" -> True "C" -> True ... for 23 more cases. And the corresponding go code in the bootstrap compiler is even worse.

desireco42

Elm is a language I enjoyed the most. I love Ruby, I loved some other languages, even Haskell I enjoyed, but Elm is special. So let's make this work. Now that you got foundation created, let's see how to move it forward.

danpalmer

Wow, this is amazing. I always wanted to love Haskell but never really managed, Elm nailed the balance of usability and correctness, plus the architecture was beautiful. I've never liked Go, but its strengths are absolutely compiling to single binaries, fast compile times, and concurrency primitives (not necessarily using them) etc. Compiling to Go is a great idea.

MegagramEnjoyer

wow this is pretty cool!

linzhangrun

It is a very good attempt, but I am quite pessimistic about the prospects of new programming languages in the AI era. Unless, of course, it is a language specifically designed for AI coding — for example, one that is self-contained and carries a great deal of contextual information, making it unsuitable for humans to write but highly suitable for large language models. That kind of future would probably be quite promising.

Semantic search powered by Rivestack pgvector
3,752 stories · 35,056 chunks indexed