Stream: helpdesk (published)

Topic: "Java is OOP, while Julia is..."?


view this post on Zulip Davi Sales Barreira (Feb 06 2022 at 17:43):

Hey everyone, I was wondering if there is a name for the programming paradigm in Julia. Is there such a thing ?

view this post on Zulip Fredrik Ekre (Feb 06 2022 at 17:45):

Functional programming.

view this post on Zulip Davi Sales Barreira (Feb 06 2022 at 17:46):

Oh, really? I thought Julia wasn't functional programming.

view this post on Zulip Davi Sales Barreira (Feb 06 2022 at 17:46):

I guess I have to read a bit more in functional programming then.

view this post on Zulip Davi Sales Barreira (Feb 06 2022 at 17:48):

I remember reading somewhere that Julia wasn't actual FP, but that incorporated some aspects of it.

view this post on Zulip Kwaku Oskin (Feb 06 2022 at 18:09):

FPMD :-)

view this post on Zulip Elias Carvalho (Feb 06 2022 at 18:09):

Multiple Dispath programing?!

view this post on Zulip Adam non-jedi Beckmeyer (Feb 06 2022 at 19:15):

There's a difference between functional programming and "pure" functional programming, and while Julia definitely doesn't belong to the latter category it does belong to the former. As a point of comparison, Lisp is also often called a functional programming language. In the end, it's probably best to call Julia "multi-paradigm" which is the label often applied to languages like python.

view this post on Zulip Mason Protter (Feb 06 2022 at 19:27):

I certainly wouldn't call julia a functional programming language. It doesn't really focus on a specific 'paradigm', at least not a paradigm that non-julia programmers would recognize

view this post on Zulip Davi Sales Barreira (Feb 06 2022 at 19:45):

I see. I thought perhaps Julia was following some known paradigm. But, as pointed, it's own docs state that it's a multi-paradigm lang. Not problem, I was just wondering if a package I was working on could somehow be placed in a specific paradigm since I was using Julia.

view this post on Zulip Mason Protter (Feb 06 2022 at 19:46):

Sure. You can write code in pretty much any paradigm you like in julia

view this post on Zulip Mason Protter (Feb 06 2022 at 19:47):

More than anything else, single paradigm langauges are more about penalizing people from deviating from a specific paradigm.

view this post on Zulip jar (Feb 06 2022 at 19:57):

I don't think julia is very functional currently, though I personally would like it to be more. And maybe it will be, e.g. https://github.com/JuliaLang/julia/pull/31630#issue-429910148

view this post on Zulip Mason Protter (Feb 06 2022 at 19:59):

Julia has what one needs to write functional code. It doesn't always have what one needs to write performant functional code, but (hot take) neither does Haskell despite what they might tell you :stuck_out_tongue:

view this post on Zulip Mason Protter (Feb 06 2022 at 20:02):

But yes, I certainly wouldn't advocate for writing functional style code in julia in many circumstances. Really depends. Julia is much more of a practical language than an ideological one.

view this post on Zulip Brian Chen (Feb 06 2022 at 20:30):

Adam non-jedi Beckmeyer said:

There's a difference between functional programming and "pure" functional programming, and while Julia definitely doesn't belong to the latter category it does belong to the former. As a point of comparison, Lisp is also often called a functional programming language. In the end, it's probably best to call Julia "multi-paradigm" which is the label often applied to languages like python.

And given how little agreement there is about in- and out-group membership for each of these "paradigms", trying to assign a language into a neat set of categories is an inherently lossy exercise. "imperative" vs "declarative" is another tarpit.

view this post on Zulip Brian Chen (Feb 06 2022 at 20:33):

To borrow a line from the OO-sphere, paradigms are "has-a" relationships rather than "is-a". Even then the threshold for having is not clear, hence the disagreement between pure FP and FP (and pure FP and purer FP, etc.)

view this post on Zulip Mason Protter (Feb 06 2022 at 20:37):

I think even the line between has-a vs is-a gets blurred too. E.g. in many people's minds, functional programming is as much about disallowing things as it is about allowing features

view this post on Zulip Davi Sales Barreira (Feb 06 2022 at 20:44):

This has-a is a nice way to look at it.

view this post on Zulip Brian Chen (Feb 06 2022 at 21:38):

My own hot take is that saying X language follows Y paradigm is primarily social signalling. It evokes a primarily emotional response and serves as a (usually poor) heuristic for those looking for a reason to jump on the bandwagon or avoid it like the plague.

view this post on Zulip Brian Chen (Feb 06 2022 at 21:40):

For this reason, I'd argue it's a poor predictor of how well one's actual experience with the language will go. IMO there are many more quantitative and qualitative dimensions to assess a language by before having to resort to such vagaries.

view this post on Zulip Takafumi Arakaki (tkf) (Feb 06 2022 at 22:38):

Fredrik Ekre said:

Functional programming.

YES!!!

view this post on Zulip jar (Feb 06 2022 at 23:07):

The marketing around these paradigms does confuse things. As we saw in the other OOP thread, programming languages all say they're "functional" these days, just like they all were "object-oriented" in 2000 and "structured" before that. Often such languages capture some of the ideas of $paradigm but miss others.

view this post on Zulip Brenhin Keller (Feb 06 2022 at 23:57):

Personally, I call it "dispatch-oriented programming", because concepts like type-stability are really critical here, and don't really have an analogue in languages that aren't focused around multiple dispatch... but not sure how other folks feel about that term

view this post on Zulip Rein Zustand (Feb 07 2022 at 01:54):

The Wikipedia article on Julia says

Distinctive aspects of Julia's design include a type system with parametric polymorphism in a dynamic programming language; with multiple dispatch as its core programming paradigm.

view this post on Zulip Patrick Toche (Feb 07 2022 at 07:15):

when asked to select "white", "black", "hispanic", "asian", I just want to scream!


Last updated: Nov 22 2024 at 04:41 UTC