News for hackers. Stuff that matters.
Re:Java 16 by mdm12 on Tuesday March 16, 2021 @11:11AM (#26477779)
We see similar developments with C# borrowing features from F#, with records in v9, pattern matching, etc.

While it's good for C#/Java, it does make it harder to push for adoption for a language such as Scala and F#. Why bother investing in the languages with a much smaller market share when the big boys adopt good bits and pieces from them constantly?

Re:Java 16 by gugagore on Tuesday March 16, 2021 @11:18AM (#26477897)
> Why bother investing in the languages with a much smaller market share when the big boys adopt good bits and pieces from them constantly?

This won't always apply, but sometimes (many times?) there's a software endeavor that permanently feels on the margins of a programming language's capabilities, whatever that means. You may forego market share in order to be 5 or 10 years ahead of current practice. In other words, the mainstream isn't converging to a stable F# / Scala / whatever. It's lagging behind. It's not the last time that a mainstream language adopts a feature that has been available for years in a more fringe ecosystem.

In practice, I'm sure the most important thing is humans and their skill, so mainstreamness matters. But if you can somehow be less sensitive to that, you may reap a lot of benefit from using Foo before it was cool.

Re:Java 16 by geodel on Tuesday March 16, 2021 @11:43AM (#26478319)
Another thing to note that cutting edge languages do not always deliver great features , they also deliver with great frequency half baked features to be discarded or deprecated in few years. Also since most effort spent on language , tooling remain primitive and slow for long time.

So I do not see them a sure win for projects I work on.

Re:Java 16 by mumblemumble on Tuesday March 16, 2021 @12:06PM (#26478651)
FWIW, I feel that way about Scala, but not F#.

The only big F# feature I know of that's fallen out of favor is type providers, and, IMO, that's not because the feature was half-baked so much as because it was one of the many casualties of .NET's transition to being a truly cross-platform toolkit.

Re:Java 16 by riyadparvez on Tuesday March 16, 2021 @12:26PM (#26478982)
Because Scala is a truly innovative and experimental language that came out of a programming language research group. That's why there's a lot of features that didn't play out well in real-world. F# started out as .NET rendition of OCaml. Most languages initiated by large crops don't try to be innovative, rather they take approaches introduced by different niche languages (many of them are only for research purpose) and incorporate to their language. Languages that try cater to a large audience should be adopting features from experimental languages.
Re:Java 16 by mumblemumble on Tuesday March 16, 2021 @12:31PM (#26479033)
F#'s relationship has been vastly overblown. The truth is that they're about as closely related as C# and Objective-C. In the same way that the overlap between C# and ObjC is basically just the C bit, the overlap between F# and and OCaml is basically just the ML bit. (Actually, even less than that.) You could say that it was inspired by OCaml, but it includes almost none of what makes OCaml OCaml, and adds a lot of its own new ideas.
Re:Java 16 by ragnese on Tuesday March 16, 2021 @02:44PM (#26481071)
To someone who has a passing familiarity with OCaml, but none with F#, can you elaborate? Because I do hear the comparison frequently.

Do people just draw the comparison because they don't actually know of any other ML languages besides OCaml?

Re:Java 16 by mumblemumble on Tuesday March 16, 2021 @03:43PM (#26481847)
I haven't touched OCaml in a while, but the things it has and F# doesn't that I can remember include: Functors (in the ML sense), camlp4, polymorphic variant types, multiple inheritance, class interfaces.

Things F# has that OCaml lacks: Extension methods, units of measure, type providers, quotations, computation expressions, active patterns, overloading.

Probably most of the F# things could be (and perhaps have been) added to OCaml with camlp4, which is more powerful than F#'s quotations. Versus, F# may never be able to have all of OCaml's ad-hoc polymorphism features. So there's that. But I'm mainly meaning to compare what's actually built into the language.

Re:Java 16 by gugagore on Tuesday March 16, 2021 @11:48AM (#26478384)
Great point about half-baked features. The investment boils down to risk-reward. Can we say that the features that are introduced into Java at this point are features that have stood the test of time in other languages?
Re:Java 16 by geodel on Tuesday March 16, 2021 @11:56AM (#26478500)
I have already used `records` in some project I work on. To me it does not look too clever / funky. It still looks like very obvious Java code but little more concise.
Re:Java 16 by Barrin92 on Tuesday March 16, 2021 @12:31PM (#26479034)
>Why bother investing in the languages with a much smaller market share when the big boys adopt good bits and pieces from them constantly?

because if you know exactly what you want to do there's no reason to settle for the second best thing. If you want F#, no harm with going exactly with F#.

I talked to a bunch of Jane Street engineers once and the consensus seemed to be that Ocaml, despite its very small footprint, actually helped them attract the kind of people who were super enthusiastic about building really good stuff with a good technology, so it actually made recruiting for them easier.

Re:Java 16 by hota_mazi on Tuesday March 16, 2021 @02:16PM (#26480692)
> actually helped them attract the kind of people who were super enthusiastic about building really good stuff with a good technology, so it actually made recruiting for them easier.

Sounds like a strong case of selection bias.

There is no shortage of people who are super enthusiastic about building really good stuff with good technology, and it's hard to believe that it's easier to hire Ocaml engineers than other languages.

Re:Java 16 by nonameiguess on Tuesday March 16, 2021 @08:21PM (#26485021)
I really don't want to sound elitist, but there is the issue that probably 90% of people who have ever written code for money know enough Java to get by and credibly claim they can do it on a resume. Just the ubiquity in university intro courses and enterprise use means everyone gets exposed to it.

On the other hand, if you see someone took the time to learn OCaml, I think you can be reasonably well assured they legitimately love programming. Signal value jumps from "this person has ever programmed" to "maybe this person has a real passion for it."

Re:Java 16 by jjav on Tuesday March 16, 2021 @06:03PM (#26483761)
Agreed. I worked with a team who was heavily into scala and one of their beliefs was that all the smartest people want to work on scala, thus having the company use scala will filter only the smartest people to want to work for us.
Re:Java 16 by dfgdghdf on Tuesday March 16, 2021 @12:44PM (#26479239)
I can only comment on C# / F#.

The C# versions of F# features tend to be pretty clunky compared to the F# versions. This is because F# was designed for them from the beginning, rather than having them tacked on. Functional programming is getting easier in C#, no question about that, but honestly, it still kind of sucks. And the OOP-minded C# devs on your team still won't be able to make sense of your code that leverages all these fancy new features anyway.

Re:Java 16 by adamdusty on Tuesday March 16, 2021 @06:52PM (#26484270)
What fancy features won't we understand?

I think some things about functional programming make code feel cleaner, but I don't like it enough to use F# or Haskell.

Re:Java 16 by dfgdghdf on Wednesday March 17, 2021 @05:25AM (#26488497)
If you do stuff like this: https://weblogs.asp.net/dixin/category-theory-via-csharp-7-m...

(Note this is horrible because C# does not support this style well, in F# it's idomatic)

Re:Java 16 by xwolfi on Tuesday March 16, 2021 @12:40PM (#26479185)
But it's fine, we don't really care about language adoption if the best most supported most tested most hiring languages swallow their features, right ?

What matters is what we do with the language, more than the name of it no?

Re:Java 16 by mdm12 on Tuesday March 16, 2021 @01:14PM (#26479748)
The problem (as I see it, anyways) is that the 'big boys' that I referred to in my initial comment have been around a long time (2000 for C#, 1995 for Java) and over that long history, have had a slew of language changes. They are starting to suffer from the same problem that C++ suffers from, where every shop defines their own subset of the language with which they use. Meanwhile, the languages that they graft features from (e.g., F#) tend to be smaller and more coherent with respect to the feature set.
Re:Java 16 by kaba0 on Tuesday March 16, 2021 @04:19PM (#26482278)
But that’s the great thing about java, it is still a pretty lean language even with its age.
Re:Java 16 by simiones on Wednesday March 17, 2021 @03:05AM (#26487493)
And even C#, which has grown a lot, tends to have pretty orthogonal features, so that you don't end up too often in C++'s problem that every feature interacts with every other feature and complicates it.
Re:Java 16 by dweekly on Tuesday March 16, 2021 @11:31AM (#26478119)
Really sorry to ask the dumb question here, but what is V9? A cursory Google search didn't show me anything about e.g. a major update to the V8 JavaScript engine?

UPDATE: Ah, C# v9.0 thank you all.

Re:Java 16 by mdm12 on Tuesday March 16, 2021 @11:33AM (#26478159)
I meant 'v' as in 'version' of C#, here's a good reference on it: https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csh...
Re:Java 16 by BuckRogers on Tuesday March 16, 2021 @11:56AM (#26478489)
"We see similar developments with C# borrowing features from F#, with records in v9, pattern matching, etc."

Parsing that sentence the subject is C# and F# is referenced, but the subject of the sentence didn't change, it remained C# thus logically v9 applies to it.

Re:Java 16 by url00 on Tuesday March 16, 2021 @11:37AM (#26478235)
Re:Java 16 by T-zex on Tuesday March 16, 2021 @11:35AM (#26478192)
Re:Java 16 by yashap on Tuesday March 16, 2021 @11:34AM (#26478179)
They meant version 9 of C#, the language.
Re:Java 16 by pjmlp on Tuesday March 16, 2021 @02:25PM (#26480802)
No bother, beyond learning new concepts.

In the end platform languages always take the most relevant pieces from the guest languages, which eventually fade away.

Re:Java 16 by agumonkey on Tuesday March 16, 2021 @02:03PM (#26480513)
Semi sad state of the universe