News for hackers. Stuff that matters.
Re:Codata in action, or how to connect FP and OOP by pansa2 on Monday August 10, 2020 @04:29AM (#24106880)
Solving the expression problem requires maintaining static type safety. AFAIK Julia doesn’t do this because it’s dynamically typed.
Re:Codata in action, or how to connect FP and OOP by shele on Monday August 10, 2020 @05:27AM (#24107227)
People using Julia are quite happy how it alleviates the expression problem compared to languages they used before. Your argument, if I get it right, that Julia can't solve the expression problem because "the expression problem requires maintaining static type safety" reminds of the "Bumblebees can't fly" fable.
Re:Codata in action, or how to connect FP and OOP by saithound on Monday August 10, 2020 @05:49AM (#24107375)
Well, the expression problem is a clearly formulated question: how can we have three desirable things at the same time (no need to modify existing code, no need for code repetition and no need for runtime type errors [1])? See also the project management triangle: if you need something fast, good and cheap, then fast, good and expensive won't be a satisfactory answer, no matter how many millionaires are satisfied with the latter.

[1] https://link.springer.com/chapter/10.1007/978-3-540-24851-4_...

Re:Codata in action, or how to connect FP and OOP by shele on Monday August 10, 2020 @08:26AM (#24108499)
Honestly, if you want to discuss the progress made on the expression problem by a dynamical language whose power and extensibility partly comes from a collection of informal, consensus based interfaces you have to start from a different theory.
Re:Codata in action, or how to connect FP and OOP by Hitton on Monday August 10, 2020 @05:39AM (#24107296)
Most people using language X are quite happy how X does things compared to languages they used before. That's why they use the language X. That's also the reason why I consider this type of argument unhelpful.
Re:Codata in action, or how to connect FP and OOP by shele on Monday August 10, 2020 @05:51AM (#24107386)
No, not "most people" and not "happy how X does things" but specifically people who have thought about the expression problem's opinion about how Julia alleviates the expression problem compared to other languages they know.
Re:Codata in action, or how to connect FP and OOP by mirekrusin on Monday August 10, 2020 @06:31AM (#24107613)
I don't think you can classify Julia like this.

It's kind of both.

Julia has types on bindings, in that sense it is statically typed.

Re:Codata in action, or how to connect FP and OOP by pansa2 on Monday August 10, 2020 @06:39AM (#24107653)
“Julia is squarely in the dynamic camp” - Stefan Karpinski, Julia co-creator

https://stackoverflow.com/a/28096079

Re:Codata in action, or how to connect FP and OOP by mirekrusin on Monday August 10, 2020 @08:17AM (#24108441)
...but you've ommited what I meant "(...) Unlike many dynamic languages, however, Julia has a fairly sophisticated language for talking about types, and you can annotate expressions with types. (...)"

Also other answers have some good information, ie:

" (...) It can also be useful to indicate the argument types to restrict the kind of parameters passed when calling. Our function header for floating point numbers would then look as function mult(x::Float64, y::Float64). When we call this function with mult(5, 6), we receive an error, ERROR: 'mult' has no method matching mult(::Int64, ::Int64 ), proving that Julia is indeed a strongly typed language. It does not accept integer parameters for the floating point arguments. (...) "

...in other words saying that "Julia is dynamic langauge, full stop." doesn't answer the question fully as for many readers it implies "weak typing", however it's dynamic, but strongly-typed, with state of art optimisations available as in statically typed languages, with proper multiple dispatch on all arguments (not single/this dispatch as in ie. java) etc.

It is definatelly worth playing with the language for people who hesiate on learning it - Julia provides some very interesting features not seen anywhere else.

Re:Codata in action, or how to connect FP and OOP by codr7 on Monday August 10, 2020 @08:05AM (#24108350)
Well, that's like...his perspective.

It's a spectrum, not either or.

Julia and Common Lisp are somewhere in the middle.