--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Software engineers try very hard to make their software easy to use. They believe that their products are as easy to use as isIn essence, some of the people driving the evolution of Scala are building what they want, without clear evidence of what the end users actually need.
technically possible. As engineers, their belief is in technology. They see power and flexibility, richness of features and functionality in their software. What they don’t see is how difficult their software is to use for people who use it on a daily basis. As such, it is hard for them to see clearly the nature of the problems plaguing the software industry. The result is what Cooper calls “Dancing Bearware”. If one saw a dancing bear on the street, we would be amazed not because the bear dances well, but that the bear dances at all. Cooper likens this to software today in that people will overlook interaction problems because the software performs its function, albeit problematically and inefficiently.
-- Tim Renczes
Yep, Simon's right, that RS feedback would be really useful, let me know if you have any additional questions too.
--
Cheers,
√
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
Abstraction is a tricky business because it gives us the power to
create new things and often one person might not like the things
another person creates. So, it seems to me the only way to avoid the
misuses you refer to is to remove abstraction capabilities from the
language. Turn it into a pre-generics Java, so to speak. But that is
difficult, because almost everyone craves abstraction capabilities;
witness that pre-generics Java which did not have much of it, where
people resorted to horrible XML-based frameworks to get the
abstraction capabilities they needed. So, people abstract anyway, the
only question is whether they do it in the language or outside.
Maybe a possible path would be to have a language with only modest
abstraction capabilities but lots of features. That way, users would
not bother to write their own abstractions because there already was a
well-supported feature that did the same thing. That's sort of like
C#: In terms of feature count it is much larger than Scala, but its
users seem to complain a lot less about complexity; it seems they are
quite happy with the plethora of features they are given.
But it won't be me designing such a language, because trading
abstraction capabilities for basic features is exactly the opposite of
my design philosophy. My design philosophy is more like free speech.
We protect it even if it is abused. In fact free speech would be a
fiction if there were no abuses. In the same way, abstraction
capabilities would be a fiction if there was no over-abstraction. I
completely agree this approach comes with challenges. It is our
responsibility as good engineers to realize that abstractions have
benefits as well as costs, and to collectively develop designs where
the benefits exceed the costs.
Best,
- Martin
Basically I am not asking anyone to abandon their design
philosophy around using abstraction, but only to think more about
the problems that are created and finding solutions to those
problems too. Think more like Alan Cooper did.
I will leave you with this. When the automobile was invented, few
really cared about the problems it created. Millions of people
have died in automobile accidents, and now our entire planet is in
peril because of climate change. Many of the automobile's problems
were finally addressed when Ralph Nader came on the scene, and
many more have not been addressed. Computing Science and Software
Engineering have not seen their Ralph Nader yet, and we continue
to forge ahead without really appreciating the unintended
consequences of our actions.
Cheers, Eric
P.S. Implicit really should be removed from the language. It
causes more problems than it solves by creating even more of those
'you just have to know' moments. I really hate reading examples
people write because you generally cannot copy and paste them to
get a working example as they almost never declare the hidden
implicits the example depends on. It is generally impossible to
convince everyone to actually test their code examples before
publishing them. IMHO, implicit was one of the worse features
added to Scala, and I hope it gets removed from Dotty.
On Thursday, 5 November 2015 08:02:47 UTC, martin wrote:
Abstraction is a tricky business because it gives us the power to
create new things and often one person might not like the things
another person creates. So, it seems to me the only way to avoid the
misuses you refer to is to remove abstraction capabilities from the
language. Turn it into a pre-generics Java, so to speak. But that is
difficult, because almost everyone craves abstraction capabilities;
witness that pre-generics Java which did not have much of it, where
people resorted to horrible XML-based frameworks to get the
abstraction capabilities they needed. So, people abstract anyway, the
only question is whether they do it in the language or outside.
I'm reminded of the spoof interview with Bjarne Stroustrup where he says that he created C++ to create work for programmers. I think part of the popularity of Java is that people to get to create monstrous quasi languages on top called frameworks. If someone really created the perfect general purpose programming language, it would rather spoil all the other would be language designers fun.
Maybe a possible path would be to have a language with only modest
abstraction capabilities but lots of features. That way, users would
not bother to write their own abstractions because there already was a
well-supported feature that did the same thing. That's sort of like
C#: In terms of feature count it is much larger than Scala, but its
users seem to complain a lot less about complexity; it seems they are
quite happy with the plethora of features they are given.
C# is part of the .Net Visual Studio eco system, so it has a huge budget, which really helps for documentation and testing. It shouldn't be surprising that C# can keep its user base happy. Its inevitable that the bar for Scala is going to be a lot higher. Early adopters are inevitably far more self opinionated. However I do think Scala has made some wrong choices notably in the collections library, which has created extra complexity. But I see no reason to apologise for this. Things can only be learnt through experimentation. But not just experimentation, there needs to be a certain pig headedness. An approach might seem like a mistake, but requires someone to keep banging at it before it finally gets to to be really usable. Sometimes a break though happens because someone keeps pushing their intuition long after everyone else had written it off.
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
I agree we have learned many useful things in the laboratory that is Scala, but sooner or later it would be nice if these things were repackaged in a form that is practical and not only experimental.
On Thu, Nov 5, 2015, 6:25 PM Eric Kolotyluk <eric.ko...@gmail.com> wrote:
It would be odd if all our experiences matched Martin, and it is serendipitous that some do :-)
I would agree that abstraction can be a fundamental problem at times. Not everyone handles abstraction with equal skill and ease. There is much we could do to make it easier for more people to deal with the abstraction better.
For example, it made sense in Scala to replace the for-loop with the for-comprehension, but it is very much harder for some of us to keep our heads wrapped around the for-comprehension. The for-comprehension is an abstraction of map and flatmap. There is a lot more going on behind the scenes that a for-loop. While I can write code with correct for-comprehensions, it still takes me significantly more mental effort that writing a for-loop in Java.
The problem with abstraction is that, often too much of the actual mechanism is being hidden by elegant looking code, that it becomes harder to reason about the code. For example, one of my pet peeves is using for-comprehensions to deal with future values. Not only are the map and flatmap mechanisms hidden, but all of the concurrent mechanisms are too. It becomes hard to wrap your head around it without significant practice, and if your are new to the concept, well then you have no practice at all. For example, it is really easy for a novice to accidentally try to assign the expressions generating the future values within the for-comprehension itself. You 'just have to know' to assign the expressions to future vals before the for-comprehension because there is nothing in the code to show any problem, the Scala compiler will too happily do what you say and not what you want.
While it is indeed a common mistake, and documentation should be improved, I don't agree that it's a "you just have to know." If the value produced by previous future is in scope, that's proof that it has completed.
I think part of the reason people don't think of that, it's they're trying to use something without a clear understanding of it. Which is fine, but let's recognize that.
In particular, what I find too often challenging in reading Scala code and APIs is these 'you just have to know' moments. This is especially true when dealing with futures, promises, and other reactive mind puzzles.
There are various ways you could go. You could create a language that is more 'feature rich' to reduce the abstraction, but I am not advocating that.
You could improve the training materials, but this requires scarce resources.Sadly the Scaladoc is generally of little help in understanding important APIs, and I do not sense any urgency in the community to produce better Scaladoc.
While the first Coursera course I took was excellent, the second Coursera course was especially frustrating because Erik Meijer is simply not as good at explaining things as Martin and Roland are. I am sure Erik is a wonderful person, but he is not great at explaining things.When I went to other web sites to trying to understand reactive streams, the explanations were just as atrocious.In the course I actually had to experiment with some code to understand what was really going on in Assignment 4. I published my example in the discussion group. Several other students thanked me because it really helped them understand what was mechanically going on. Basically I solved the problem of poorly explained abstraction by creating an example to clearly demonstrate the concrete mechanics. This is something that Erik or someone else should have done before the course. I wish I could find someone to pay me to write Scala training materials.
You could build more diagnostic intelligence into Scalac to perform better static analysis. For example:Warning, you have written a for-comprehension with expressions producing Future values that should probably be computed prior to the for-comprehension. For example (followed by a clear example what to do). You could even change scalac to do the right thing in the first place, but I am not enough of a compiler expert to know how hard that would be to do, and the other dangers it would create.
There's no way to know that. Very often you specifically *want* it to run subsequently.
Basically I am not asking anyone to abandon their design philosophy around using abstraction, but only to think more about the problems that are created and finding solutions to those problems too. Think more like Alan Cooper did.
I will leave you with this. When the automobile was invented, few really cared about the problems it created. Millions of people have died in automobile accidents, and now our entire planet is in peril because of climate change. Many of the automobile's problems were finally addressed when Ralph Nader came on the scene, and many more have not been addressed. Computing Science and Software Engineering have not seen their Ralph Nader yet, and we continue to forge ahead without really appreciating the unintended consequences of our actions.
Cheers, Eric
P.S. Implicit really should be removed from the language. It causes more problems than it solves
How many problems does it solve?
by creating even more of those 'you just have to know' moments. I really hate reading examples people write because you generally cannot copy and paste them to get a working example as they almost never declare the hidden implicits the example depends on. It is generally impossible to convince everyone to actually test their code examples before publishing them. IMHO, implicit was one of the worse features added to Scala, and I hope it gets removed from Dotty.
On 2015-11-05 12:02 AM, martin odersky wrote:
Thanks for your input, Eric. It's interesting to me because some parts of it match my experience and others don't. I believe the fundamental issue we are grappling with is abstraction. In terms of features, core Scala is actually not that big a language. Core Scala means: excluding things that are experimental or require a special language import. And Dotty will further shrink the footprint. If you do think that there are features we could do without, I'd like to hear about them. But Scala is a language with powerful abstraction and composition capabilities. And these are used a lot, and undoubtedly they are also sometimes overused. Abstraction is a tricky business because it gives us the power to create new things and often one person might not like the things another person creates. So, it seems to me the only way to avoid the misuses you refer to is to remove abstraction capabilities from the language. Turn it into a pre-generics Java, so to speak. But that is difficult, because almost everyone craves abstraction capabilities; witness that pre-generics Java which did not have much of it, where people resorted to horrible XML-based frameworks to get the abstraction capabilities they needed. So, people abstract anyway, the only question is whether they do it in the language or outside. Maybe a possible path would be to have a language with only modest abstraction capabilities but lots of features. That way, users would not bother to write their own abstractions because there already was a well-supported feature that did the same thing. That's sort of like C#: In terms of feature count it is much larger than Scala, but its users seem to complain a lot less about complexity; it seems they are quite happy with the plethora of features they are given. But it won't be me designing such a language, because trading abstraction capabilities for basic features is exactly the opposite of my design philosophy. My design philosophy is more like free speech. We protect it even if it is abused. In fact free speech would be a fiction if there were no abuses. In the same way, abstraction capabilities would be a fiction if there was no over-abstraction. I completely agree this approach comes with challenges. It is our responsibility as good engineers to realize that abstractions have benefits as well as costs, and to collectively develop designs where the benefits exceed the costs. Best, - Martin On Thu, Nov 5, 2015 at 6:50 AM, Eric Kolotyluk <eric.ko...@gmail.com> wrote:
On 2015-11-04 1:32 PM, martin odersky wrote: On Wed, Nov 4, 2015 at 9:02 PM, Eric Kolotyluk <eric.ko...@gmail.com> wrote: Interesting claim by James Strachan. Very honest and sensible. After playing around with Java FX Script for a while I was astonished that the team at Sun Microsystems invented 'yet another language' that had many of the features of Scala, but was far less well developed than Scala. I, and others, complained about this openly, and now Java FX Script has expired, while Scala FX is a better replacement. Years before when I learned Groovy, my sense was that it was a better Java, and I really enjoyed it. After that I tried to learn Scala, and hurt myself so badly, it took over a year to take another try at it. Since then, I find that Scala is like a better Groovy, and a much better Java in many ways, but... At the same time, Scala is very similar to my experiences with C++ where C++ was supposed to be a better C. When Java first came out, I immediately abandoned C++ as being a waist of time, realizing that Java was a much better C than C++ could ever be. After 20 years of using Java I am still convinced that Java is astonishingly better than C++, but almost glacial in its evolution. My ultimate hope is some new language will come along that replaces Scala the way Java replaced C++. The most valuable thing about C++ was that it was full of lessons on how not to design a language. Similarly, Scala has many good lessons on how not to design a language. My sense of Scala is that it is the 'Kitchen Sink' language that James Gosling once talked about. My other sense is that Martin Odersky was quite brilliant in the original intent of Scala, far better than Bjarne Stroustrup was at C++, but there have been so many other cooks in that kitchen since then that Scala is now a very disturbing 'kitchen sink' indeed. While I personally enjoy writing code in Scala, I thoroughly hate reading most other people's Scala code. While I love many of the APIs in Scala, I thoroughly hate most of the others. Scala takes me to the extremes of my emotions like no other programming language I have ever used. The main problem I see with the Scala community these days is most people are too focused on adding new and 'clever' features, and too few are focused on actually cleaning up the mess. I have seen advances in Computing Science through Scala like no other language before it, but there really needs to be a new language to replace it. Scala is a really awesome playground for ideas and innovation, but I have recently concluded that it is too dangerous and unwieldy for practical software engineering solutions. I really look forward to the next new language to replace Scala. If anyone has any recommendations, please let me know. Thanks for the frank assessment, Eric! I do hope that with Dotty, the "Scala.next" effort, we can clean up some of the more contentious points of Scala. If you have some specific input what you think we should address, I'd like to read it! - Martin I tried following Dotty, but it is hard to see how to get started as everything is still very raw (uncooked). In particular, what is the difference between a Dotty program and a Scala one? Is there a Dotty primmer? I will think more about specific input, but for now here is my general sense. From an Architecture Astronaut perspective, the challenges mere mortals face in using Scala reminds me very much of "The Inmates Are Running The Asylum" by Alan Cooper. Largely the design and implementation of Scala and the accompanying ecosystem has been intended by Scala experts for Scala experts, and this pattern has tended to recurse upon itself like microphone feedback at a concert, producing some horrible noise at times. This was also much of the failing of C++ where Bjarne Stroustrup et al just seemed to feed off of ever more innovative and clever design tricks without regard for real world programmers. The real genius that James Gosling and crew brought to Java was simplifying things enormously, while adding to Java the important things missing from C, well aware of the dangers of C++. In part their goal was to bring programming to the masses, the way Steve Jobs brought personal computers to the masses. While Steve Jobs democratized computers, James Gosling democratized programming. This is really the heart of what Alan Cooper is getting at: Software engineers try very hard to make their software easy to use. They believe that their products are as easy to use as is technically possible. As engineers, their belief is in technology. They see power and flexibility, richness of features and functionality in their software. What they don’t see is how difficult their software is to use for people who use it on a daily basis. As such, it is hard for them to see clearly the nature of the problems plaguing the software industry. The result is what Cooper calls “Dancing Bearware”. If one saw a dancing bear on the street, we would be amazed not because the bear dances well, but that the bear dances at all. Cooper likens this to software today in that people will overlook interaction problems because the software performs its function, albeit problematically and inefficiently. -- Tim Renczes In essence, some of the people driving the evolution of Scala are building what they want, without clear evidence of what the end users actually need. When I was at Kodak I did a lot of User Interface Design and Implementation in Java/Swing. I think I was above average at it, but eventually I discovered other people (outside our team) who were recognizably much better than I. The point was, even though I tried to provide a lot of design leadership for our particular product, it was a lot like herding cats. Too often, other developers (like cooks in the kitchen) invented their own patterns, beaming with pride over their innovations, regardless of established principles, norms and conventions. Generally, developers designed and implemented what they liked rather than what our customers needed. I myself fell prey to this indulgence from time to time. We did some usability testing before finalizing a few important designs. I myself conducted some tests. They were very time consuming to set up and run, but they did reveal some bad patterns in our design attempts. There in lies the problem. It is way more fun and less expensive to just write code than to go to all the trouble to understand user's actual needs. The mathematical basis for Scala is remarkably beautiful at times, but most humans cannot appreciate the beauty of mathematics, especially at the higher levels, let alone use it. What Scala is lacking is the psychological basis for normal human cognition, rather than the cognition of a small group of computing science savants. After learning BASIC, FOCAL, FORTRAN, PL/1, APL, etc., when I finally learned Pascal I was in shock. While Pascal did not have all the bells and whistles of other languages, it was so much easier to write good code, and understand other people's code. When I finally had to start using C in production, I felt it was a huge step backwards from Pascal. Much of the success of Pascal was because Niklaus Wirth intended it to promote good programming practices, where Dennis Ritchie was more intent on other issues than good programming practices. It is fair to say that many of the Scala design features do promote good programming practices, most notably functional programming. However, my sense is that many other features of not only the Scala language, but the Scala ecosystem are more intended to satisfy the hacking desire of some people more intent on just having fun, without the sense of what normal software developers really need. My recent excursions into Reactive Streams has been a nightmare of WTF experiences. My experience when I am writing Scala code is that I am constantly referring to reference materials. The language, features, and concepts are so much bigger than Java, I simply do not have enough RAM in my old brain to write code without constant paging. When I read some other people's Scala code, or worse their APIs, then my cognitive paging system starts thrashing, resulting in WTF paralysis, and my verbal synthesis framework executes the 'halt and catch fire' instruction. I think what is needed is a new language, Scala-like perhaps, but designed more from a software engineering and human psychology perspective. There should be psychological and engineering, or ergonomics testing of critical ideas and concepts. By all means, all that has been learned from Scala should be considered, but the goal should be to consider the 'normal' end user (software developer) first. Advances in programming language design are like a pendulum that swings between radically innovative to the pragmatically safe, and back. Scala has become a little too radical for practical use. Cheers, Eric - Eric On 2015-11-04 6:50 AM, Oliver Ruebenacker wrote: Hello, "I can honestly say if someone had shown me the Programming in Scala book by by Martin Odersky, Lex Spoon & Bill Venners back in 2003 I'd probably have never created Groovy." -- James Strachan, inventor of Groovy Clojure? Sure, if you like Lisp. Best, Oliver On Wed, Nov 4, 2015 at 9:29 AM, Aseem Bansal <asmba...@gmail.com> wrote: Can someone give any inputs on https://www.reddit.com/r/scala/comments/3rhu5n/why_scala_not_groovy_or_clojure/ Asked a similar question from Clojure community https://www.reddit.com/r/Clojure/comments/3rcjus/new_clojurians_ask_anything/cwmue2n -- You received this message because you are subscribed to the Google Groups "scala-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsub...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Oliver Ruebenacker Senior Software Engineer, Diabetes Portal, Broad Institute -- You received this message because you are subscribed to the Google Groups "scala-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "scala-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsub...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "scala-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsub...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsub...@googlegroups.com.
Couldn't you just replace every use of an implicit with an explicit?Best, Oliver
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Couldn't you just replace every use of an implicit with an explicit?Yes, of course, but that would defeat the point: we want the compiler to figure out the value for us, meaning the compiler runs a computation on our behalf.There seems to be growing consensus that implicit conversions are a bad idea (hence they are guarded by a language feature import now), but implicit arguments are vital for concise DSLs as well as type-level computations and implicit classes (a.k.a. extension methods) greatly improve the ability to separate data from behavior.With these points in mind I must say that I am quite puzzled by Eric’s statement, the only possible interpretation is that he means dotty shall be completely different from Scala, not a successor (because it would explore a different region of the design space).
There seems to be growing consensus that implicit conversions are a bad idea (hence they are guarded by a language feature import now),
--
No, he means not to have implicits in the same way they are rejected in Kotlin and also no other language has them for a good reason (scalability of build times).
No, he means not to have implicits in the same way they are rejected in Kotlin and also no other language has them for a good reason (scalability of build times).
I think that really depends on which implicits you are thinking of:
- Many languages have implicit conversions, including many popular ones like Java and C#.
- Scala has implicit classes, which have largely the same drawbacks as extension methods, but many advantages, making them superior to extension methods in every way.
On 4 Nov 2015, at 14:29, Aseem Bansal <asmba...@gmail.com> wrote:
Can someone give any inputs on https://www.reddit.com/r/scala/comments/3rhu5n/why_scala_not_groovy_or_clojure/Asked a similar question from Clojure community
--
Thanks. You are correct in what I mean Haddock.
I am still waiting for an answer to Oliver's question.
I believe that implicit was a useful experiment in an experimental language such as Scala. The point of experiments is that you sometimes have to admit it was a bad idea
and move on.
Can anyone provide me with a list of bad features that were removed from Scala?
Part of why Scala is suffering from the 'too many cooks in the kitchen' problem is that some of the extra cooks may also suffer from 'shiny object syndrome' and will fight passionately to keep their particular shiny new Scala feature in the language, no matter what. But hey, that is fine as long as you accept that Scala is a kitchen sink language where we can continue to experiment and learn.
One of the strengths of Java is that it is guided by a philosophy that: if you make a mistake in new language features, you cannot take them back. This is necessary for a production language such as Java. On the other hand, because
Scala is not a production language, but a research language,
it is perfectly OK to make such mistakes.
We truly need both conservative and progressive thought in programming language design. Software Engineers need to have stable, well tested tools in order to build robust, maintainable solutions to real world problems. However, these tools need to evolve from Computing Scientists who take delight in thinking out of the box, challenging old ideas, exploring and experimenting with new perspectives.
Part of the success of Scala is that Martin Odersky is not Gordon Ramsay. He is a great designer and teacher, who encourages and promotes new ideas and experimentation. On the other hand, if you are trying to get the meals out for the evening in a five star restaurant, you sort of needs someone like Gordon Ramsay to exert control over the other cooks. Like it or not, Java, C#, and even C++ and Javascript are those five star restaurants. I am simply looking forward to the next five star language to emerge.
Cheers, Eric
On 2015-11-06 6:27 AM, Haddock wrote:
Couldn't you just replace every use of an implicit with an explicit?
Yes, of course, but that would defeat the point: we want the compiler to figure out the value for us, meaning the compiler runs a computation on our behalf.
There seems to be growing consensus that implicit conversions are a bad idea (hence they are guarded by a language feature import now), but implicit arguments are vital for concise DSLs as well as type-level computations and implicit classes (a.k.a. extension methods) greatly improve the ability to separate data from behavior.
With these points in mind I must say that I am quite puzzled by Eric’s statement, the only possible interpretation is that he means dotty shall be completely different from Scala, not a successor (because it would explore a different region of the design space).
No, he means not to have implicitsin the same way they are rejected in Kotlin and also no other language has them for a good reason (scalability of build times).
-- Haddock
On 2015-11-05 5:38 PM, Simon Ochsenreither wrote:
--
I agree we have learned many useful things in the laboratory that is Scala, but sooner or later it would be nice if these things were repackaged in a form that is practical and not only experimental.
How would that look like? Sadly what I see is that most languages just adopt either whatever Scala did or something worse (usually 10 years after Scala shipped it).
Do you have an example where an experimental feature in Scala shipped in a more practical form somewhere else?
I would say that Function Types being implemented in Java 8 is a god example of an experimental feature being shipped in a more practical form somewhere else.
It is easy to poke holes at that statement so I will go on to explain.
My premise is that Scala is still an experimental language,
therefore even Function Types are an experimental feature,
even though they are a core feature of Scala. The landmark success of Scala was to prove that functional and object oriented features could coexist competently. The fact that Java has incorporated it validates that success.
Then again, compared to C#, Java was late to the game, but better late than never.
Also, C# implemented Function Types in a manner very recognizable to Scala, so it is fair to say, two leading languages have benefited from importing Scala features.
Similarly, Java is reducing boilerplate based on Scala. Similarly, the design of the Scala collections classes has greatly influenced the evolution of the Java collections classes, most notably around.
I would agree, that from your perspective "what I see is that most languages just adopt either whatever Scala did..." but this really is features repackaged in a more practical form.
In the long run, I would like to see a new language, that takes the good things in Scala (and some other languages), but intentionally leaves out the problematic features
the same way that Java left out the worst features of C++ and other languages.
Sadly, I am not a brilliant composer like Martin Ordersky and others, but I am a pretty good DJ.
Cheers, Eric
I would say that Function Types being implemented in Java 8 is a god example of an experimental feature being shipped in a more practical form somewhere else.
On Fri, Nov 6, 2015 at 4:13 PM, Rich Oliver <rzi...@gmail.com> wrote:
> On Friday, 6 November 2015 14:02:34 UTC, rkuhn wrote:
The problem with implicit conversions is that they are so powerful.
If you have an implicit conversion from String to HTMLContent in
scope, every single String in your program will suddenly have all the
methods of HTMLContent (except if they have the same name as a method
on string).
I already said "It is easy to poke holes at that statement."
If you cannot accept the premise that "Scala is still and experimental language" then anything thereafter is pointless. You are not arguing with the points in the discussion, you are only arguing with the premise. It is sufficient to say, "I don't agree with your premise" and say nothing else.
I plan to say nothing else on this sub-thread as don't like to engage trolls.
Cheers, Eric
On 2015-11-06 12:11 PM, Rex Kerr wrote:
Correction: there _should_ be 100-odd different function types. There are _actually_ "only" 43, which means there are a less crazy number of things to remember. (But gives you point 3.)--Rex
On Fri, Nov 6, 2015 at 12:08 PM, Rex Kerr <ich...@gmail.com> wrote:
On Fri, Nov 6, 2015 at 11:45 AM, Eric Kolotyluk <eric.ko...@gmail.com> wrote:
I would say that Function Types being implemented in Java 8 is a god example of an experimental feature being shipped in a more practical form somewhere else.
Seriously?! It feels like a way _less_ practical form to me, weirdly tacked-on and rather clunky instead of just being a seamless part of the language.
First, there are 100-odd _different_ function types. You need to use the correct one, which if you're writing a lambda inline is easy because the compiler fills it in for you, but if you already have one and need a different one, you have to write another lambda. And if you have to write your function signature, you need to remember what's a Predicate and what's a UnaryOperator and so on, not just state what types you need.
Secondly, there is very little inheritance relationship between the different types. But method names are sometimes reused (accept) and sometimes not (applyDouble) with little rhyme or reason apparent.
Thirdly, there are weird holes in what's available. Want an ObjDoubleConsumer? Great! Want a DoubleObjConsumer? No go!
I'm glad Java picked it up--it's better than nothing. But it is a long way from as nice as in Scala.
--Rex
I already said "It is easy to poke holes at that statement."
If you cannot accept the premise that "Scala is still and experimental language" then anything thereafter is pointless.
You are not arguing with the points in the discussion, you are only arguing with the premise. It is sufficient to say, "I don't agree with your premise" and say nothing else.
static <T,K,U> Collector<T,?,Map<K,U>>
toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper). Suddenly, upper bounds have a much smaller, and more focused use-case, and we "discovered" context bounds as a better, more flexible solution which we use over upper bounds.
We wouldn't arrived at this huge advancement of how we write code without actually going out and trying it.
Most languages only have upper (and lower) bounds, don't provide their users with a better abstraction, and as "the limits of my language are the limits of my world" developers can not even look further.
Extension methods are a well-liked feature in some languages. But if you compare it to implicit classes which subsume extension methods, you will see that the feature that
extension methods provide is pretty much the least interesting aspect of what makes implicit classes useful. Extension methods allow none of the use-cases I would implicit classes for.Things Scala doesn't have:
> Static typesScala has no static types???