Borgo is a statically typed language that compiles to Go

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • borgo

    Borgo is a statically typed language that compiles to Go.

    This addresses pretty much all of my least favorite things with writing Go code at work, and I hope--at the very least--the overwhelming positivity (by HN standards -- even considering the typical Rust bias!) of the responses inspires Go maintainers to consider/prioritize some of these features, or renews the authors interest in working on the project (as some have commented, it seems to have gone without activity for a little bit over half a year).

    Some of the design decisions seem to me to be a bit more driven by being Rust-like than addressing Go's thorns though. In particular, using `impl` to define methods on types (https://borgo-lang.github.io/#methods), the new syntax for channels and goroutines (https://borgo-lang.github.io/#channels), and the `zeroValue()` built-in (https://borgo-lang.github.io/#zero-values-and-nil) seem a bit out of place. Overall though, if I had a choice, I would still rather write Borgo by the looks of it.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • oden

    The Oden Programming Language (NO LONGER IN ACTIVE DEVELOPMENT)

    About a year ago, I tried writing a language that transpiled to Go with many of the same features, in my research I found other attempts at the same idea:

    - braid: https://github.com/joshsharp/braid

    - have: https://github.com/vrok/have

    - oden: https://oden-lang.github.io/

  • go

    The Go programming language

    I'm not sure what exactly you mean by acknowledgement, but here are some counterexamples:

    - A proposal for sum types by a Go team member: https://github.com/golang/go/issues/57644

    - The community proposal with some comments from the Go team: https://github.com/golang/go/issues/19412

    Here are some excerpts from the latest Go survey [1]:

    - "The top responses in the closed-form were learning how to write Go effectively (15%) and the verbosity of error handling (13%)."

    - "The most common response mentioned Go’s type system, and often asked specifically for enums, option types, or sum types in Go."

    I think the problem is not the lack of will on the part of the Go team, but rather that these issues are not easy to fix in a way that fits the language and doesn't cause too many issues with backwards compatibility.

    [1]: https://go.dev/blog/survey2024-h1-results

  • grumpy

    Grumpy is a Python to Go source code transcompiler and runtime. (by grumpyhome)

  • rescript-compiler

    The compiler for ReScript.

  • prometeo

    An experimental Python-to-C transpiler and domain specific language for embedded high-performance computing

    Not impossible but I guess you might end up with an extra runtime layer and some more dynamic operations will not be very fast. Or you restrict it to a subset of Python like this project does: https://github.com/zanellia/prometeo

    You could of course write a bytecode VM in Golang but I guess that defeats the purpose.

  • bflat

    C# as you know it but with Go-inspired tooling (small, selfcontained, and native executables)

    The sibling pretty much sums it up. But if you want more detail, read on:

    Generally, there are three publishing options that each make sense depending on scenario:

    JIT + host runtime: by definition portable, includes slim launcher executable for convenience, the platform for which can be specified with e.g. -r osx-arm64[0].

    JIT + self-contained runtime: this includes IL assemblies and runtime together, either within a single file or otherwise (so it looks like AOT, just one bin/exe). These requires specifying RID, like in the previous option.

    AOT: statically linked native binary, cross-OS compilation is not supported officially[1] because macOS is painful in general, and Windows<->Linux/FreeBSD is a configuration nightmare - IL AOT Compiler depends on Clang or MSVC and a native linker so it is subject to restrictions of those as a start. But it can be done and there are alternate, more focused toolchains, that offer it, like Bflat[1].

    If you just want a hello world AOT application, then the shortest path to that is `dotnet new console --aot && dotnet publish -o {folder}`.

    [0] https://learn.microsoft.com/en-us/dotnet/core/rid-catalog

    [1] https://github.com/bflattened/bflat (can also build UEFI binaries, lol)

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • ClosedTypeHierarchyDiagnosticSuppressor

    Suppresses exhaustiveness warnings for switching (switch statement or expression) on closed type hierarchies

    It's not the best solution, but an analyzer like [0] covers most of the cases for reference types. For enums and struct DUs in general we'll have to wait for language (or even runtime) support.

    [0] https://github.com/shuebner/ClosedTypeHierarchyDiagnosticSup...

  • It's not the best solution, but an analyzer like [0] covers most of the cases for reference types. For enums and struct DUs in general we'll have to wait for language (or even runtime) support.

    [0] https://github.com/shuebner/ClosedTypeHierarchyDiagnosticSup...

  • assemblyscript

    A TypeScript-like language for WebAssembly.

    I like your take but JavaScript was literally the assembly language of the web until WASM came along. There was no other language that TypeScript could compile to.

    This train of thought lead me to discover AssemblyScript! https://www.assemblyscript.org/

  • wire

    Compile-time Dependency Injection for Go

    code generation is a mostly disjoint topic from DI. Granted, some solutions like https://github.com/google/wire use code generation, but you're exactly right about their pitfalls. If your dev environment doesn't have good support for generated code, it is a nightmare. If you can goto-definition the generated code, then it is suddenly feasible, but perhaps still a bad choice.

  • braid

    Discontinued A functional language with Reason-like syntax that compiles to Go. (by joshsharp)

    About a year ago, I tried writing a language that transpiled to Go with many of the same features, in my research I found other attempts at the same idea:

    - braid: https://github.com/joshsharp/braid

    - have: https://github.com/vrok/have

    - oden: https://oden-lang.github.io/

  • have

    The Have Programming Language

    About a year ago, I tried writing a language that transpiled to Go with many of the same features, in my research I found other attempts at the same idea:

    - braid: https://github.com/joshsharp/braid

    - have: https://github.com/vrok/have

    - oden: https://oden-lang.github.io/

  • gleam

    ⭐️ A friendly language for building type-safe, scalable systems!

    I haven't had time to really try to write anything in it, but https://gleam.run/ looks really good too. Like Elm for backend + frontend!

  • purescript-native

    A native compiler backend for PureScript (via C++ or Golang)

    There was also purescript: https://github.com/andyarvanitis/purescript-native

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • One Letter Programming Languages

    8 projects | /r/programming | 13 Apr 2021
  • Go Range Iterators Demystified

    1 project | news.ycombinator.com | 14 Jul 2024
  • Ask HN: Is there any software you only made for your own use but nobody else?

    65 projects | news.ycombinator.com | 4 Jul 2024
  • I Have No Constructor, and I Must Initialize

    4 projects | news.ycombinator.com | 5 Jul 2024
  • The first 10k games at bgammon.org, an open source online backgammon service

    3 projects | news.ycombinator.com | 2 Jul 2024

Did you konow that Go is
the 4th most popular programming language
based on number of metions?