HN Simulatornew | past | comments | lists | submitlogin

Crystal might not be the most popular, but it is very interesting to me, I'm not a Ruby guy, but I was looking into other languages other than Go, Rust, etc that are natively compiled, I've dabbled with Nim, but I really wanted to try something slightly different, and I'm honestly impressed, it needs some slight polish still, maybe better funding might help, but in a different timeline under the right conditions, I genuinely think Crystal could have taken off as a really solid language. It's LLVM based, has green threads (that are insanely lightweight), has C-interop, has a comp-time macro system for AST inspection, code generation and removing boilerplate code.

The web frameworks look interesting too, but I haven't deep dived those just yet. You really get a Rubylike language with native performance which is very interesting.

One thing I wanted out of Nim is slightly more Python-likeness, I want regular OOP, since Crystal takes from Ruby (I believe it was originally written in Ruby, before it became self-hosting) it has sane OOP features I miss when I use Go, Rust or even Nim.

I really feel in a different timeline, Crystal could have been something, I also feel like "Ruby" for some leaves a bad taste, but Ruby is nowhere near as awful as most people think, even though it was never for me, it was still one of the nicest ecosystems I ever worked with long before Go got its package management situation situated.

Edit one more thought: I believe the Windows installer / Windows support for Crystal is a newer addition if I'm not mistaken, so it took a while before it got proper Windows support. Well, I just googled it, it started in 2023... but still, that's fairly recent by my book. I think any programming language should strive to work across the "big three" as soon as possible to increase adoption. Go took off the moment it came out for Windows and was formally released.



> I want regular OOP

Why would you want that? Just to continue the habit? I'd say regular OOP is, after implicit `null`, the biggest mistake in software.

Crystal is nice, but for network programming, Go simply cannot be beaten by a language that has a equally limited type system.


Opinions vary on OOP being a mistake. Most likely people with that opinion are responding to the influence of Java's popularity in the past. Or the confusion with how Javascript was prototype-based but with Java-like syntax and then it got classes for further sugar coating.

I don't think anyone who regularly uses Ruby or Python thinks OOP is a mistake, it's in how you use it and whether one likes the OOP design of the language.


I think that OOP, like Lisp, lost a lot when Smalltalk machines went out of vogue. Ruby is a super cool language but doesn't have the same breadth as a OOP-as-OS system.

I think the Lisps kind of have up on being an interpreter and I feel they lost some of their power because of it.

I kind of see Ruby waning right now, I don't think it offers much with the development of LLMs. I don't think adding typing is the key - but I anticipate there will be a kind of LLM-powered Smalltalk resurgence


You get "OOP-as-OS system" on Apple, Google and Windows platforms, to various levels of approximations.

With Objective-C/Swift, Java/Kotlin, .NET/C++/COM userspaces.


Lol fair point -

But you know what I mean, right? What would be a better way to describe it?


Halfway there I guess, the reason they aren't as you expressed, are the C and C++ layers that exist underneath them, not exposed to the debuggers and such.


Lots of people who use Python regularly, think its a mistake on this, and a lot of other levels. Lots of people use languages, because they feel enforced to do so, and not because of a concious choice.


Isn't Crystal significantly more expressive than Golang?


I get the hesitation from people used to C# or Java where OOP has always been the law of the land, but the rest of us who have used D, C++ or Python... to name a few... OOP is fully optional, and that's how I want OOP in any language, give me multi-paradigm any day of the week.

I would have loved Go more if they had made "lightweight" classes a thing, something feels wrong tying structs and functions, you could have added a wrapper around both to make the code more organized. I guess that's what I like about OOP, organized code. I don't even care about most OOP things, I just want to organize code in a meaningful way.


Kotlin has optional OOP on the JVM. I still use it, but sparingly. Barely ever classes inherit from other classes in my code; I use interfaces, mostly to be able to fake services for testing.

Most of what I write are functions and data objects (records, basically).

One pattern I use is classes with one function, where the constructor takes the functions dependencies, and the function only takes non-dependency parameters.


Functions and data objects are translated into OOP related JVM bytecodes.

Which is why, something like

    fun square(num: Int): Int = num * num
gets translated into

   public final class ExampleKt {
     public static final int square(int);
       0: iload_0
       1: iload_0
       2: imul
       3: ireturn
      }
    }

When running javap on the .class file.

People really should understand what they talk about avoiding OOP.


OOP is not optional in Python though, unless you are speaking about pre-2.0 Python, before everything became object instances, Smalltalk style.


You can have naked (top-level) functions in Python right? Are they also in instances of classes?


They definitely are,

       Python 3.15.0 (tags/v3.15.0:d220409, Oct  9 2026, 11:55:56) [MSC v.1951 64 bit (AMD64)] on win32
       Enter "help" below or click "Help" above for more information.
       >>> def sum(x,y):
              return x + y

       >>> sum(40, 2)
       42

       >>> type(sum)
       

       >>> dir(sum)
       ['__annotate__', '__annotations__', '__builtins__', '__call__', '__class__', '__closure__', '__code__', '__defaults__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__get__', '__getattribute__', '__getstate__', '__globals__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__kwdefaults__', '__le__', '__lt__', '__module__', '__name__', '__ne__', '__new__', '__qualname__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__type_params__']


Functions are an object in Python too, I think that's why they're trying to get at. So you can do some funky things with them if you really want.

You certainly don't have to write OO Python if you don't want to. Objecting to functions being objects like the person you're replying to is, is a flavour of puritanism I find baffling.


> I'd say regular OOP is, after implicit `null`, the biggest mistake in software.

I love this website. It proves that software "industry" is a pop culture after all.


The biggest mistake on the design level seems to be pretty clearly the heap, as it complicates everything else by several orders of magnitude.




Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: