Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wow, that's a bunch of reading to do :)

> I've not heard of the term "multiple dispatch"

https://en.wikipedia.org/wiki/Multiple_dispatch (includes example from NGS too)

In NGS, multiple dispatch is based on CLOS model described at https://en.wikipedia.org/wiki/Common_Lisp_Object_System , with my own simplifications.

> Powershell does support this with classes

Somewhat similar. Since methods do not live in classes in NGS, I would argue the mechanism in NGS is simpler (more elegant?). You can just define your_method(c1:Class1, c2:Class2).

> murex does it's overloading at the API level[1].

mmm. I see the support but looking at documentation at https://murex.rocks/docs/apis/Unmarshal.html , I see it's not exposed into the Murex language, it's in Go. Is this correct?

> where you don't need to think about data types, file formats, etc, murex does the heavy lifting for you in a consistent and predictable way

That is good and what I would expect.

( sorry, running out of time, to be continued :) )



> https://en.wikipedia.org/wiki/Multiple_dispatch (includes example from NGS too)

Learn something new every day. Seen (and used) this methodology before but wasn't aware it was called that. I'd always heard of it as "overloading" which is conceptually similar but not identically the same.

> mmm. I see the support but looking at documentation at https://murex.rocks/docs/apis/Unmarshal.html , I see it's not exposed into the Murex language, it's in Go. Is this correct?

It's APIs written in Go (for performance and convenience -- you wouldn't want to write a YAML marshaller in a shell scripting language). So the methods are exposed as builtins. However you can add method written in murex if you wanted.

The idea being get 99.9% right by default but leave some flexibility for the user to customise if they want.

Murex builtins are also written in a way that they're all optional includes into the core project. Thus you can easily write your own builtins, marshallers, etc in Go if you want performance and then call them from your shell script (or you could write them in Python, Java, Perl, etc and run them as an external executable if you wanted too. But if you do that you lose access to murex's typed pipelines. Which is where the really interesting stuff happens (I haven't yet figured out a non-shitty way to send typed data over POSIX pipes to external executables).

> sorry, running out of time, to be continued :)

Any time :) I'm finding this conversation really interesting and educational




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: