I’m not talking about “using”. I had to use Java for a previous job (and also during my college stint) and I hated the language, especially because I first started with Ruby and I couldn’t stop thinking “this could be so much easier and elegant”. I’m talking more about, “I really want to use X to do this project/script/thing”. For me, it would be Commonlisp or Elixir. Crystal too if it wasn’t so far behind in terms of maturity and community.
Elm would be my choice. Such an amazing language. Purely functional, type safe, immutable, impressive compiler with human readable feedback, time traveling debugger, and compiles down to JavaScript.
I used it daily for a couple years almost a decade ago. Never reached 1.0.0, sadly, but had the same sense of joy working in Elm as I do in Ruby.
These days I use htmx on the front end (Ruby on the backend). It’s not a language, though, only a library.
I have secret love affairs with Python; not fluent though… ![]()
I will code with anything except Haskell… Rust, Go, …
Ruby is my preferred way.
I even used Ruby with AI in the kernel .. Basically i know how to resolve the problem problem, i just write ruby and tell AI : Rewrite me the code i wrote in C.
Ruby is the closest language to plain english.
I enjoyed learning Elixir because it helped me understand more about functional programming, concurrency. The Erlang VM and the fault-tolerance approach is also very powerful in my opinion.
I haven’t used in a while but I like Go because of its simplicity, consistency and a solid standard library. The syntax can get a bit ugly (in my POV), specially with the explicit error handling but you can get used to it.
I’ve been wanting to try Roc, but it is currently being overhauled so I’m waiting for the changes to settle.
Same with htmx and its upcoming new major version.
Crystal seems interesting too. If I’m ever in a situation where Ruby is definitely too slow and I have 100% control over the solution, I might try Crystal. I’m not sure I’ll ever be in that situation, though ![]()
NGL, modern JavaScript is actually kinda nice.
Implicit Object initializers in function calls
const foo = ({x,y}) {
// ..
}
foo({x: 4, y: "bar"}) // obviously normal calling
const x = 10
const y = "baz"
foo({x,y}) // implicit for {x: x, y: y}
But, because this isn’t kwargs but it just an object, you can create APIs where you implement a callback that selects what it wants to be injected with using object keys.
For example, a testing framework that provides assert, assertEquals, request, and headers to any test that needs them. The framework would do this:
userProvidedTestFunction({assert,assertEquals,request,headers})
If you don’t need request or headers, don’t accept them:
test("test stuff", ({assert,assertEquals}) => {
// ...
}
This is like a more compact version of what we used to do in Ruby with hashes as fake keyword args.
property accessors
In Ruby, there are no properties, just syntactic sugar for foo= calling foo=(new_value). In JS, properties are real, so you don’t have to make methods for them, but if you want to you can
const foo = {
get bar { return "baz" }
}
foo.bar // => "baz"
I wish more JS APIs used this. For example, custom elements could use this instead of attributeChangedCallback
Runtime Type Info if you use Classes
class Foo {
}
const x = new Foo()
console.log(x.constructor.name) // # => Foo
Granted, this is normal in Ruby, but it surprised me that you can access this in JS. (Of note, this isn’t really a type since types in JS are extremely degenerate, but it’s still a way to find out ‘wtf is this thing?’)
When I’ve written a lot of code in JS and stuck to object-oriented style, it was kinda nice!
Browser APIs are pretty nice these days
The browser is really powerful and as someone that kinda sat out a good chunk of the front-end disaster era, the browser’s API do a lot of what people were missing 10 years ago.
It runs everywhere
There is something really powerful about being able to write sophisticated programs without having to have a server or even a dev environment.
I agree @davetron5000, JavaScript has come a long way in the past few years. I appreciate a lot of what’s actually a decent stdlib now—especially if you’re using Node. And there are a lot of good APIs available in browsers for all things UI without any dependencies (or one or two tiny ones). I also like writing Ruby-esque OOP code in JS…some of the functional purists out there get bent out of shape, but I really don’t care. ![]()
I love working in SvelteJS & Typescript.
I am building a lot with Go and Rust now. I love ruby still, but need to move away from it a bit for my mental health.
Ruby is absolutely my main and favourite language but I do dabble with others to see what it’s like.
Javascript: A necessary beast in the world of web development. It’s honestly not too bad to write but the ecosystem is incredibly painful.
C++: You definitely feel the legacy but it is very powerful, I don’t see another language I could have built Taylor with.
Crystal: I’m rooting for this language but I feel it misses a lot of marks I need.
Go: Absolute top tier in terms of features I love (cross compilation being the biggest) but I don’t love the language design.
Have you tried Kemal?
I have, it’s quite nice but very bare bones.
Yes it’s. but I think it’s the purpose.
I think the potential of Crystal lies in having a really powerful binding interfaces ecosystem. How cool would it be to be able to write some Crystal code (which is pretty much a copy-paste of Ruby code in a low-level implementation), compile it into a binary and be able to use it in a ruby codebase as easily as we can use a C++ or Rust library? It could be huge for both the python and ruby community. But the crystal community is pretty adamant in saying that they’re not a ruby offshoot or wannabe, that they’re just inspired by the ergonomics of Ruby, so it’s probably not the direction they want to go. It’s also clear that Crystal is first and foremost a kind of academic project and doesn’t really claims to be much more than that
(I have explored in the past the possibility of making a crystal ffi for ruby or forking one of the various ones that are dead but I don’t have nowhere the level of knowledge to undertake such a project)
I really like Swift’s design ethos, as taught by Paul Hudson (https://www.hackingwithswift.com), which helped me see Swift as a great language sitting in between:
- The niceties and flexibility of a dynamic language
- Trying to avoid unforced errors, since the time to turnaround bug fixes is so long
Writing Swift code has actually helped me become a better Rubyist (and programmer in general), because it’s forced me to think a lot about failure states, when error propagation should be handled, and aiming for simplicity
I enjoy JavaScript alot. I began my JS journey reading Douglas Crawfords, JavaScript The Good parts and its a language I have learned to love alot. It offers a lot of liberality in what you can do if you are careful enough to not shoot yourself in the foot.
My solution for code libraries has been to copy/paste the code I need directly into my project (assuming the license allows it). Usually, I only need one function and it’s easy enough to inspect how it works, so don’t need or want it to be updated and don’t need an NPM dependency.