Live data from Hacker News

Scala founder: Language due for 'fundamental rethink'

infoworld.com

111–118 of 118 posts

Re: Scala founder: Language due for 'fundamental rethink'

#111
post #39

Earlier quoted context omitted.

Do you think Scala could succeed with a "Scala--" fork: "Java, the good parts". Just a few things like type inference and implicits and case classes would be enough to make Java devs drool without getting scared by FP or performance scares.

You could totally use Scala as a language without the laziness, which can be quite a pain when doing perf-sensitive work. Traits are also a huge deal. I don't think the community wants to go in that direction though. Who Scala attracted was a lot of FP programmers (Haskell/ML) who wanted to do work on the JVM; not Java programmers looking for a better alternative to Java on the JVM. So is life.

This probably depends on where you work, though. I work in the industry, and in my experience people using Scala (1) are simply looking for a better Java, and have no prior knowledge of FP or other languages which are not C-like OO. They would probably freak out if they saw a language similar to ML. On the other hand, the few people I know working in academia have very little interest in Scala.

(1) i.e. my coworkers, and people I know in other companies.

Re: Scala founder: Language due for 'fundamental rethink'

#112
post #102

Earlier quoted context omitted.

Haskell is very clean and readable. The problem, however, is that its such a departure from imperative languages that you can't bring much of anything you already know over to it. You really do have to forget everything you're learned about programming and start from scratch. Until then, its all alien. That being said, I think that Haskell is the most clean looking of all the FP languages, but that's purely my opinio…

Haskell suffers from people who want to make things look clean and achieve it by using symbols and very short names. These things have to be memorized before you can understand anything. Basically, people are trying to make Haskell code look like math and the truth is that math's symbolic notation is optimized for hand writing speed, /not/ reading comprehension. Take a look at Ada code. Maybe they're taking it a bit…

Well written - for some particular definition of "good" - Haskell is quite pleasant to read and work with. But, frequently, the code I see looks like mix of bash and PERL, only with a bit more consistent indentation.

OCaml code, on average, has less symbol-based infix functions and tends to be more readable (for me). But I'm not a Haskell programmer, so maybe that's a matter of getting used to, like parens in Lisps...

Re: Scala founder: Language due for 'fundamental rethink'

#113

Earlier quoted context omitted.

You didn't read GP's post?

"In terms of complexity, I don't know whether Yammer featured that, but you definitely do hear that a lot [from] many people. Yes, absolutely -- that's precisely what we want to address in the future versions." --Odersky I read it, I'm just asserting it! Any issue with that?

I don't think that quote is about syntax. In programming languages there are other, way more important sources of complexity besides syntax.

Re: Scala founder: Language due for 'fundamental rethink'

#114
post #109
post #102

Earlier quoted context omitted.

Haskell suffers from people who want to make things look clean and achieve it by using symbols and very short names. These things have to be memorized before you can understand anything. Basically, people are trying to make Haskell code look like math and the truth is that math's symbolic notation is optimized for hand writing speed, /not/ reading comprehension. Take a look at Ada code. Maybe they're taking it a bit…

I don't think this is true. I think Haskell's notation is the way it is because it emphasizes the "look" of certain abstract patterns that would be obscured by the notation used in other languages (I believe this is the case for math as well... I doubt it's that way for hand writing speed, since I doubt that's the bottleneck in maths). This is not what many of us who come from other programming languages are used to,…

> since I doubt that's the bottleneck in maths

I'm not a mathematician, but I heard that math is most frequently written on a whiteboard. If that's true, then optimizing for speed and space efficiency of hand-writing suddenly makes sense.

> I doubt the majority of Haskell programmers would prefer a more verbose notation

The exact same thing can be said about PERL programmers. But why stop there, take a look at APL, J, K languages. J, for example, ships with all standard verbs aliased to words, like "under", "behead", "curtail" etc. Of course, nobody uses those, they write "&.", "}.", "{." instead.

The difference is that in J you have small, consistent core vocabulary (http://www.jsoftware.com/help/dictionary/vocabul.htm), and once you learn it and it "clicks", you very much are ready to do anything with the language. Haskell way makes you go through the same process again and again with almost every library. The sad thing is that you could write Haskell in a way which wouldn't require you to internalize large numbers of new symbols, but you generally don't. Is it really because of how much better the abbreviated, symbol-based notation is so much better, I have to wonder.

Re: Scala founder: Language due for 'fundamental rethink'

#115
post #110
post #101

Earlier quoted context omitted.

Sure, but given your backgound, I imagine you are fully aware that back in the early 90's the OO community was quite divided about what are actually the core concepts and their implementation. So, what OO is all about will depend which researcher gets asked.

Just like languages have versions/revisions, e.g: C++11,C++14, Java8 ...etc, having versions at major changes during evolution of OO might have helped in creating reference points which can facillitate discussions and enhance understanding i.e. like OO98, 0099, OO2005 ...etc.

That's impossible, because what would you write in OOxx, given the different CS views and programming models on the subject?

Jump dump what is being worked on at any given point in time?

For me it is hard to grasp how youngsters see OO or FP, because I was part of the initial mainstream waves. So I got to see the things in a different perspective.

The world at companies was procedural, and lots of experimentation was going on.

Re: Scala founder: Language due for 'fundamental rethink'

#116
post #109

Earlier quoted context omitted.

I don't think this is true. I think Haskell's notation is the way it is because it emphasizes the "look" of certain abstract patterns that would be obscured by the notation used in other languages (I believe this is the case for math as well... I doubt it's that way for hand writing speed, since I doubt that's the bottleneck in maths). This is not what many of us who come from other programming languages are used to,…

> since I doubt that's the bottleneck in maths I'm not a mathematician, but I heard that math is most frequently written on a whiteboard. If that's true, then optimizing for speed and space efficiency of hand-writing suddenly makes sense. > I doubt the majority of Haskell programmers would prefer a more verbose notation The exact same thing can be said about PERL programmers. But why stop there, take a look at APL, J…

> I'm not a mathematician, but I heard that math is most frequently written on a whiteboard. If that's true, then optimizing for speed and space efficiency of hand-writing suddenly makes sense.

But a lot of math is read from papers as opposed to written. Math and logic papers employ the concise notation we're talking about. You'd think mathematicians would have evolved a better notation for paper-writing if one was lacking (there being already many conventions and style guides that apply exclusively to paper writing and that are odd for everything else).

> The exact same thing can be said about PERL programmers. But why stop there, take a look at APL, J, K languages. J, for example, ships with all standard verbs aliased to words, like "under", "behead", "curtail" etc. Of course, nobody uses those, they write "&.", "}.", "{." instead.

Indeed, the same could be said about other languages. I was even going to write in my original post "of course, Haskell programmers are self-selecting". There are problems with the syntax of some of the languages you mentioned, probably because they require a special keyboard, which is an obvious hurdle. Others may not have prevailed because they were jarring to programmers that also had to program in mainstream languages (therefore, the familiarity argument all over again). Yet others are arguable -- PERL for example is joked about as a "write only" language, but how much of that is truly because of its syntax? Maybe idiomatic PERL merely leads to barely understandable programs. Maybe PERL is simply not a good language, no matter what (note: I'm not arguing this is the case, not being a PERL programmer myself). And maybe it's not true that PERL programmers find no fault in its syntax; maybe they have trouble reading their own code, which would put them in a different category than Haskell programmers!

In the end, all of this amounts to: a language syntax is aimed at its intended audience, programmers using that language and familiar with its intended degree of abstraction and with the problems it aims to solve. Programmers from other languages will often find it weird (and in Haskell this problem is increased by the fact it seems to belong in a different category than languages such as Java/C++/C#/etc.). It is a mistake to say that, because of this, language X has a "harder syntax"; the more correct claim would be "language X has a syntax that will likely be harder to learn for programmers used to F-inspired languages". This is probably related to the Blub paradox :)

Re: Scala founder: Language due for 'fundamental rethink'

#117
post #116

Earlier quoted context omitted.

> since I doubt that's the bottleneck in maths I'm not a mathematician, but I heard that math is most frequently written on a whiteboard. If that's true, then optimizing for speed and space efficiency of hand-writing suddenly makes sense. > I doubt the majority of Haskell programmers would prefer a more verbose notation The exact same thing can be said about PERL programmers. But why stop there, take a look at APL, J…

> I'm not a mathematician, but I heard that math is most frequently written on a whiteboard. If that's true, then optimizing for speed and space efficiency of hand-writing suddenly makes sense. But a lot of math is read from papers as opposed to written. Math and logic papers employ the concise notation we're talking about. You'd think mathematicians would have evolved a better notation for paper-writing if one was l…

> It is a mistake to say that, because of this, language X has a "harder syntax"

Yeah, I mostly agree. But I believe there is some objective notion of readability and that syntax can be objectively more or less readable. However, that's only my belief, as we have no objective way to measure readability yet. (There's this wiki article: http://en.wikipedia.org/wiki/Readability but as far as I can tell nobody bothered to apply methods mentioned there to code)

So, as it's almost impossible to have a meaningful discussion on readability, I don't try to argue that Haskell is or isn't readable at all. However, the fact(? seems intuitive enough, but maybe it's wrong?) that it's easier to associate meaning to words than to abstract symbols and the frequent use of abstract symbols to name things in Haskell makes me argue that Haskell is harder to learn than for example J (btw, J and K use only ASCII characters). But that, too, is open to discussion - one can claim that names like are easier to learn and more precise, because they come without any prior associations in the reader's mind.

In the end, the only thing I can say is that for me - probably because of a whole lot of factors and influences - word-based identifiers are easier to learn and use than symbol-based ones. It's entirely possible that a majority of Haskell programmers are different in this regard (and yes, they - as for all languages - are most certainly self-selecting).

Re: Scala founder: Language due for 'fundamental rethink'

#118
post #93
post #79

Earlier quoted context omitted.

> an assertion that type classes are OO They never occurred to me as OO. Could someone explain this?

Sure, since I mentioned it. Sorry if I misassume your OOP experience. Many think about OOP as introduced by Simula/Smalltalk, or how it is served by Java/C#... ones. However there are many other ways of doing OOP, which many of us in the old (early 90's) experimented with, while OOP was striving to become mainstream. Type classes in Haskell and their use, can be easilly mapped to interfaces/protocols/traits/... in th…

To my mind, the biggest thing missing from typeclasses that you get automatically with many OO systems is a sense of persistent identity of objects. Of course Haskell has ways to roll your own, and I'm not sure the decoupling is a bad thing by any means, but it's a difference.
Post reply on HN