
Show HN: A new programming language inspired by Go, no LLVM by hualaka
A general-purpose open-source programming language and compiler designed to provide developers with an elegant and concise development experience, enabling them to build secure and reliable cross-platform software simply and efficiently.
- ✓ Simple, natural, consistent syntax design, even programming beginners can easily grasp, quickly get started!
- ✓ No dependency on llvm and VM, compiles directly to target platform machine code and supports cross-compilation
- ✓ Simple deployment, purely static linking based on musl libc, no additional dependencies, good cross-platform characteristics
- ✓ Comprehensive type system with support for generics, union types, interfaces, null-value safety, etc.
- ✓ Same high-performance GC implementation as go, with very short STW (Stop The World)
- ✓ High-performance memory allocator implementation like go, similar to google/tcmalloc
- ✓ High-performance shared-stack Coroutine implementation, capable of millions of Coroutine switches per second
- ✓ Built-in libuv to handle IO event loops in collaboration with the concatenators
- ✓ High-performance runtime and compiler based on a pure C implementation
- ✓ Modularity and package management system npkg
- ✓ Built-in implementations of common data structures and standard libraries
- ✓ Use try+catch for error handling, match for pattern matching, channel for concurrent communication, select for concurrent processing
- ✓ Follow the system ABI, built-in libc, you can directly call the C language standard library functions to accelerate code development
- ✓ editor lsp support
- ○ High-performance memory management to assist in automatic GC
- ○ Testing DSL in hopes of utilizing AI coding efficiently and consistently
- ○ macho cross-platform linker (lack of macho linker currently prevents cross-compilation on darwin platform)
- ○ Collaborative scheduling system
- ○ Cross-platform compilation support for wasm and riscv64 platforms
- ○ Compile to readable go programming language
The nature programming la
18 Comments
hualaka
I am the author of the nature programming language. You can find code examples and a playground to try it out on the official website at https://nature-lang.org I would appreciate your feedback.
fithisux
Do you use Go Assembly for code generation?
arthurcolle
the name of the programming language should be in the title, I'm sorry but come on
mrbluecoat
Great job! An impressive set of functionality for an initial release. The syntax is also quite intuitive in general but these were a bit odd to me:
(int,bool,bool) t = (1, true, false) // v: Define a tuple. Access elements using t[0], t[1], t[2]
string? s = null
nlitened
Impressive work, but how is it better/different from Go or other programming languages? What would be one’s motivation to switch to this language?
pjmlp
Love the effort, and brownie points for proper imports instead of directly referring to SCM urls.
avestura
Maybe I have a too strict definition of systems programming languages, but I would never call a GC language a systems programming language. Who would use an operating system that suddenly stops the entire world because some random language's runtime wants to collect its memory garbage?
That said, well done for making this.
WhereIsTheTruth
Nice, the kind of project everyone should support, a language with a fully working backend for both X86/ARM
Clean source code too, impressive project
lambertsimnel
Previous discussion:
https://news.ycombinator.com/item?id=37869445
intalentive
Why should I care whether LLVM is used? What’s the advantage?
CyMonk
Why does it have a Millennium Falcon as a logo? ;)
thayne
I like a lot of things about this, and it addresses some of my complaints about go.
But I'm confused on why strings use ascii encoding instead of utf-8. What if you need non-ascii characters?
alain_gilbert
I haven't seen anything about public/private properties/functions. So everything is public ?
hwj
I'm surprised ".n" was not already a used file extension:
https://en.wikipedia.org/wiki/List_of_filename_extensions_(M…
xigoi
Considering that it’s supposed to be a “better Go”, there are some things it does worse than Go, such as type-before-name or using less-than and greater-than signs for type parameters.
alexpadula
Really cool to see! Keep it up :) I wish you the best on Nature
potato-peeler
> No dependency on llvm and VM, compiles directly to target platform machine code and supports cross-compilation
Hey, can you comment on how this was achieved?
codeptualize
Love this, definitely rooting for this to get big!
I think the goal is great. My dream language is something "in between Go and Rust", Go but with more expressive types, Rust-light, something along those lines. This seems like it is hitting that sweet spot.
Imo Go gets a lot right when it comes to productivity, but the type system always annoys me a bit. I understand the choice for simplicity, but my preference is different.
Rust is quite enjoyable, especially when it comes to the type system. But, kinda the opposite of go, it's a lot, maybe too much for me, and I frequently don't know what I'm doing haha. I also don't really need Rust level performance, most things I do will run totally fine with GC.
So Go with some extra types, same easy concurrency, compilation and portability sounds like a winner to me.