Go is less complex than rust? Really? I thought that was disputed.
You can read and grok the entire gospec in a week.
Borgo is a statically typed language that compiles to Go
141–150 of 559 posts
Re: Borgo is a statically typed language that compiles to Go
#142Why is this suddenly news, when by all appearances it's abandonware?
Re: Borgo is a statically typed language that compiles to Go
#143I would kill for these languages features in Go
The latter will be there in one of the future versions and is in an active design phase, which luckily focuses on tagged-union implementation strategy.
With that said, you can already easily use one of the Option/Result libraries or write your own structure - switching on either is trivial (though you have to sometimes choose between zero-cost-ness and convenience).
It already has struct generics, iterator expressions (LINQ), switch pattern matching, good C interop and easy concurrency primitives (no WaitGroup nonsense, also has Channel). Oh, and also portable SIMD, C pointers and very strong performance in general.
* True as in proper tagged unions with either a tag or another type of discriminant and aliased layout, instead of tag + flattening all constituent parts into a one jumbo struct. Or making it an opaque pointer to a box (like Java does, or C# if you go inheritance/interface route). These don't count. I'm curious about Borgo's lowering strategy for enums, but given Go doesn't have those, I'm not holding my breath and expecting something like F# struct unions at best.
Re: Borgo is a statically typed language that compiles to Go
#144Earlier quoted context omitted.
I love Go's letter casing. It's such a neat way to remove cruft.
Go's semantic use of case is objectively bad because most of the worlds scripts do not have the concept of it. For example ideographs, as used in eastern countries, do not have capitalization. This means programmers in many parts of the world cannot express identifiers in their native tongue.
Re: Borgo is a statically typed language that compiles to Go
#145Earlier quoted context omitted.
There is a phenomenon I have observed many times where you can get a bunch of people in a room and make some statement, in this case, "Compilers are different than transpilers", and everyone around the table will nod sagely. Yup. We all agree with this statement. But if you dig in, it will turn out that every single one of them has a different interpretation, quite often fatally so to whatever the task at hand is. I…
I've observed this sort of behavior frequently, is there a name for this phenomenon yet? Something like "Assuming all concepts are universal to one's own peculiar definition" Maybe "semantic egocentrism" could fit the bill?
I love the "draw me a tree" idea of a Platonic form, we all have an idealized model of what that is, that is uniquely our own. With that in mind isnt everything subject to some sort of semantics?
Re: Borgo is a statically typed language that compiles to Go
#146I find it conceptually compelling, I'm just surprised the target would then be in the GC'd, larger-binary'd direction. Like 'Java expressiveness with C simplicity, transpiles to Java'.
Perhaps 'just' because it's a lot simpler to just expand the target language slightly and then you only have to deal with mapping the new bits into implementation, it's less like writing a compiler for a whole new language?
Re: Borgo is a statically typed language that compiles to Go
#147It's a little suspicious the example uses math/rand.Seed() which has been deprecated for over a year. That's when I noticed the repo itself hasn't had a single commit in 7 months. Why is this suddenly news, when by all appearances it's abandonware?
Because the submitter suddenly found it, and it was new to many others too? It's not a 'Show HN'.
Re: Borgo is a statically typed language that compiles to Go
#148Great! Something I've always wanted. I'd love to be able to use a bit more type-y Go such as Borgo, and have a Pythonesque dynamic scripting language that latches onto it effortlessly. Dynamic typing is great for exploratory work, whether that's ML research or developing new features for a web app. But it would be great to be able to morph it over time into a more specified strongly typed language without having to r…
Re: Borgo is a statically typed language that compiles to Go
#149I would kill for these languages features in Go
That's what C# offers (except true * Rust-style enums). The latter will be there in one of the future versions and is in an active design phase, which luckily focuses on tagged-union implementation strategy. With that said, you can already easily use one of the Option/Result libraries or write your own structure - switching on either is trivial (though you have to sometimes choose between zero-cost-ness and convenien…
Re: Borgo is a statically typed language that compiles to Go
#150Earlier quoted context omitted.
I like rust, I write go. There was a thread here the other day where a rust dev pointed out that "Rust is the language tokio ate"... https://nullderef.com/blog/rust-async-sync/ Rust is a lot of overhead when go is "good enough" for 99% of what needs to get done. That doesn't mean go is good for everything. I would still rather write Rust than C or C++ or bunch of other languages. Look at a project like Pingora, from…
Go could have been like Modula-3, D or C#, instead they decided to revamp Oberon and Limbo, the version 1.0 of those languages from the 1990's, not what was latter done from their learnings, e.g. Active Oberon. Now thanks to Docker and Kubernetes adoption success, we're stuck with it. At least now generics are supported, unless one needs gccgo, maybe in 10 years we get Pascal enumerations.
Go is stone cold simple to pick up. ITs simple to reason about. I can decompose a project and spoon feed it to a JR engineer and they can get through it.
Rust is none of those things.
Its great for low level stuff, it is in the kernel right next to C and go will NEVER be there. Why, because that is what rust is good at.
> At least now generics are supported, unless one needs gccgo, maybe in 10 years we get Pascal enumerations.
Again I like rust. Crates being colored (as in functions), the shitty compile and tests times... these are things that are holding back rusts adoption in more places... None of this stuff is on the road map to get fixed, it's quite the glass house you have.
Go is going to replace a fair bit of python/ruby in the next few years... Is it going to be rust or zig that eats into c/c++? If the rust community keeps on the way it has been, zig will eat all the core apps we depend on.