Hacker News new | ask | show | jobs
by zoogeny 982 days ago
I like the feel of the syntax on first glance.

I have been thinking recently that all of the new powerful features showing up in language (Typescrpt, Go, Rust, Elixir, Kotlin, etc.) have been exposing programmers to combinations of programming language features that were not widely available before. I mean, I grew up with Pascal, Basic, C/C++ and Lisp but kids these days are growing up with Python, Typescript, Rust, Go, Haskel, Kotlin, Dart, Swift, C#.

Specifically I was thinking about how I avoid classes now for almost all of my code. I used to be a OOP first guy. Now I want value semantics and abstract data types. I have always hated exceptions (or any non-local control flow in general) and I love guards and defer-like semantics. I love the idea of CSP and Erlang but I also want full low-level control of bits. I want custom allocators and no GC, except maybe when I want a GC for some reason.

I love that people are just experimenting by taking the bits and pieces they like from the multitude of available high-quality languages and they are mixing them up into strange new soups.

3 comments

I do dream of some serious Erlang alternative that runs on its own without needing an entire runtime, but in all honesty Elixir / Erlang are insanely optimized, it blows my mind. I think I'm too used to the C#'s and Pythons of today, I too used Basic and a little bit of Pascal back in the day. I'm always excited by D but it gets overshadowed by Go and Rust it feels like, despite having really good features and a familiar syntax for anyone coming from C# / Java / C-like languages in my opinion.
I'm glad you mentioned D and I literally paused while writing the above to consider if I should include it. Back when I was writing a lot of C++ (decades ago now) my greatest hope was that D would catch on. It is hard to say why it didn't and I think all of the hype on the C++ successor goes to Rust these days. Zig is probably the most likely candidate for a C replacement even though D has a subset termed as Better C.

It really is the case that there is an endless list of programming languages now that serve as inspiration for almost every use case. I mean, I didn't even mention Clojure or Julia or Lua ... the list of truly interesting language and approaches is almost endless.

I see the potential in D, what I think it needs is a batteries included web framework maybe built on top of Vibe.d or forked from Vibe.d that means you don't have to piece together all the missing pieces. The more you can get done OOTB in a language, the more likely you are to use a language / framework.
I don't think you can have a serious Erlang alternative without an entire runtime, but if you are interested in the (better) C-style syntax, then you miht be interested in Gleam[1] which is a seriously cool Erlang based language that is built with standard styling and ideas (type-safe, concurrency (actor-based), C-style, immutable, you can even compile out to javascript and run in the browser)

Think Elixir, access to the entire Erlang VM (and any other language/package built on it) with the syntax of C and you are there.

[1] https://gleam.run/

I forgot about Gleam, it is definitely really interesting, but its also strange since I think you have to compile your code, I don't think you can just debug it as you write it.
I like the feel of the syntax, short, concise, clear, powerful and understandable even on first read. Combining the best of all worlds together.

Is that enough to give up the ecosystem from any other more established language? Most likely no.

For this to take off, it needs seamless interop with some other more established language or it needs to have some other major unique selling point. Rust had borrow checker. Go had goroutines. Both backed by big companies btw. Just 10% better syntax or 10% faster speed, without an ecosystem behind, is not going to be enough to tip anyone over, except the curious hobbyist explorers.

Hopefully some ideas from here will spread to other mainstream languages.

I use classes as syntactic sugar to a pure functions. People like their objects, but if you treat them as immutable struct data everyone is happy.. well at least less unhappy.
If you care about visibility control and minimalistic API design, then the most basic OOP features also provide a set of simple but powerful features: encapsulation, and contextual info on overload resolution (A.foo() is the foo() from A's type, no just any foo that can take A)