6 ms·
Three things stick out to me on https://gossamer-lang.org/docs/migration/rust/ https://gossamer-lang.org/docs/migration/rust/ * No user macros at all. Six fixe
by reocha 3mo ago
Three things stick out to me on https://gossamer-lang.org/docs/migration/rust/ https://gossamer-lang.org/docs/migration/rust/
* No user macros at all. Six fixed format! / println!-family macros expand at parse time. - Meta programming is incredibly important in rust.
* (unsafe is) Forbidden at the language level. No unsafe keyword in Gossamer source. std is safe-Rust too. - No low level programming then.
* No move semantics. Non-trivial values are heap-allocated, reference-counted, and shared by reference; primitives are copied the same as Rust. - Again, no low level programming.
Calling this rust flavored (or even a systems programming language) seems a bit bold.
- bfung 3mo agoTotally agree, misleading. The syntax looks like rust, but esp w/the memory management model (reference counting), it’s going to have more overhead than rust when it’s running, more like Swift or at worse, Python.
- deleted 3mo ago[deleted]
- charlieflowers 3mo agoOriginally I replied here that I thought you were both missing the point (but I was wrong). I wrote: It has a garbage collector and goroutines, so clearly it is not trying to be a systems programming language. Then ... I saw that it does indeed pitch itself as a systems programming language. So, I guess you both are right. If Gossamer were to drop that claim, then I'd say it looks impressive to me. I have often wanted this particular mix of language features.
- jeremyjh 3mo agoGoogle called Go a "systems language". I agree its not the right term, but people do use it to describe a language used in infrastructure software like Docker or Kubernetes. To me it makes a lot of sense as a starting point. The world does not need another Rust since we have a perfectly good one. People who like Rust's type system but don't care to think about ownership when writing application code, and who appreciate the language asyncing all the things invisibly have plenty to like here. I do agree though any serious language MUST have an FFI capability, and macros or at least some form metaprogramming of seem like tablestakes. Green threads are not impressive if they are not preemptive. But its not describing itself as finished, its 0.19. Rust looked completely different at that stage in its development - I think it still had green threads itself at that point.
- librasteve 3mo agodoes rust have FFI, then? (aka stable ABI)
- jeremyjh 3mo agoIt can export a stable C ABI. Most languages can - is there any language that has a different stable ABI? What I was talking about though, was calling into C APIs through FFI, which pretty much every language except Gossamer can do.
- norman784 3mo agoThis language reminds me of Borgo https://borgo-lang.github.io https://borgo-lang.github.io
- SkiFire13 3mo agoIt has a Rust-like syntax, enums, matching, traits, etc etc. Yes, it also loses a lot of special characteristics of Rust, but it has to be different somewhere. Moreover a lot of people like Rust as a high level language, i.e. ignoring the lower level capabilities and lifetimes, and this seems to be a direct response to that feeling.
- Recurecur 3mo agoAll three points are erased by its ability to call Rust functions… It’s not a bad approach, in that for most general programming one doesn’t need those things. Granted, macros can be convenient.
- reocha 3mo agoAny language with FFI support can call rust functions.
- Recurecur 3mo agoMy impression was that Gossamer has good Rust FFI rather than basic C FFI, sharing struct layout etc. I may play around with Gossamer and see how it really does performance wise… The syntax similarities help make for a more painless two language approach.