Okay, based on your criteria – a C-like high-level language, good for Unix environments and CLI tools, with excellent tooling outside of monolithic IDEs like IntelliJ and good public LSP support – there are a few strong contenders that immediately come to mind, and two stand out significantly:
- Rust
- Go (often called Golang)
Let's break down why these are great fits and touch on a few others.
1. Rust
-
C-like? Yes, syntactically it uses curly braces, semicolons (mostly), function calls func(), if/for/while keywords, similar control flow. It feels familiar if you've used C/C++ or Kotlin.
-
High-Level? Yes. While it gives you low-level control over memory (no garbage collector), it provides high-level abstractions, powerful type system, algebraic data types, traits (like interfaces/type classes), and memory safety guarantees at compile time. This prevents common bugs like null pointer dereferences or data races without needing a GC or manual free() calls everywhere.
-
Unix Environments/CLI Tools? Excellent fit. Rust compiles to native binaries, has great performance, and its focus on reliability makes it popular for system utilities and command-line applications. Cargo, the package manager and build tool, is superb and standard.
-
Tooling (Non-IntelliJ / LSP)? Absolutely superb. Rust has one of the best tooling ecosystems around, largely independent of specific IDEs.
- Cargo: The standard build tool, dependency manager, test runner, documentation generator, formatter, linter. It's command-line driven and works flawlessly.
rust-analyzer: The official, open-source LSP (Language Server Protocol) implementation. It provides incredibly rich features (completion, go-to-definition, refactoring, diagnostics, etc.) in any editor that supports LSP (VS Code, Neovim/Vim, Emacs, Sublime Text, Helix, etc.). It's widely considered one of the best LSPs available.
- Other tools:
rustfmt (formatter), clippy (linter).
-
Downsides: Can have a steeper learning curve than languages with garbage collection, particularly understanding the ownership and borrowing system. Compilation times can sometimes be longer for large projects (though improving).
2. Go
-
C-like? Yes, designed with C's syntax as an inspiration. Uses curly braces, semicolons (optional, usually handled by the formatter), if/for/switch keywords. Less emphasis on OOP inheritance compared to Kotlin, more on composition and interfaces.
-
High-Level? Yes. It has a garbage collector, built-in concurrency features (goroutines, channels), a strong standard library, and is generally designed for developer productivity while maintaining good performance.
-
Unix Environments/CLI Tools? Excellent fit. Go compiles very quickly to native binaries, often creating a single executable file with no external dependencies (statically linked). Its standard library is fantastic for common CLI tasks like networking, file manipulation, parsing flags, etc. Very popular for building infrastructure tools.
-
Tooling (Non-IntelliJ / LSP)? Also excellent. Go's tooling is simple, fast, and built into the standard distribution.
go build / go run / go test etc.: Simple, fast command-line tools for building, running, and testing.
gopls: The official, open-source LSP implementation. Provides great features in any LSP-supporting editor. Fast and reliable.
- Other tools:
go fmt (formatter), go vet (linter).
-
Downsides: Presence of a garbage collector means less fine-grained memory control than Rust/C/C++. Error handling uses a multi-return value pattern (value, err) which is different from exceptions (like Kotlin) or Rust's Result type.
Other Potential Candidates:
- D: Explicitly designed as a potential successor to C and C++. Has C-like syntax, compiles to native code, offers both GC and manual memory management, and powerful features. It has decent tooling (
dub package manager, LSP support) but a significantly smaller community and ecosystem compared to Rust or Go.
- Zig: Aims to be a "better C". Syntax is somewhat C-like, focuses on low-level control with modern safety features (no hidden control flow/allocations). Excellent C interop. Compiles fast. The ecosystem and tooling (like its LSP,
zls) are less mature than Rust or Go but developing rapidly. It's closer to the metal than Rust or Go, so perhaps less "high-level" depending on your definition.
- Vala: Compiles to C code (specifically, it's designed to work well with the GObject system). Has C#-like syntax (which is quite similar to C/Java/Kotlin). Tooling exists (
valac compiler, LSP support) but it's very tied to the GNOME/GObject ecosystem, which might be more overhead than you want for any small CLI tool unless you specifically need that integration.
Conclusion:
Given your preference for a C-like feel, need for strong non-IntelliJ tooling/LSP, and target of Unix CLI tools, Rust and Go are the top recommendations.
- Choose Rust if you prioritize performance, memory safety without a GC, and are willing to invest time learning its unique ownership system. Its tooling and LSP (
rust-analyzer) are top-tier.
- Choose Go if you prioritize rapid compilation, a simpler language model with GC, excellent standard library, and very fast build times. Its tooling (
gopls) is also excellent and very straightforward.
Both will serve you very well for writing CLI tools on Unix and have vibrant, independent tooling ecosystems. I'd recommend trying out a small project in each to see which language's philosophy and workflow resonate best with you.