7 ms·
> Will we just be stuck in a local maxima of Java for next 50 years? 1. Yes, if the extent of the imagination is languages like Idris and ideas like effect sys
by pron 9y ago
> Will we just be stuck in a local maxima of Java for next 50 years?
1. Yes, if the extent of the imagination is languages like Idris and ideas like effect systems, that follow a gradient descent from Java, and always in the same direction: being able to express more constraints. What you get "for free" from such languages may not be significant enough to justify the cost of adoption, and the valuable stuff you can get is not much easier than the options available today, which are too hard for anyone to take. If you were to consider truly novel languages that think out of the box (e.g. Dedalus/Eve) then maybe one will stick and make an actual impact rather than just a change in fashion.
2. How do you even know that we can do much better? NASA engineers may not like it, but they don't complain that we're "stuck" at sub-light speeds. Maybe Brooks was right and we are close to the theoretical limit (that we know must exist).
> We talk about languages as a bag of feelings and fuzzy weasel words that amount to “It works for my project”.
Can you find another useful way, available to us today, of talking about languages?
> “Use the right tool for the job” Zero information statement.
That's right, but it's not a dumb cliché so much as it is a tool we've developed to shut down religious/Aristotelian arguments that are themselves devoid of any applicable, actionable data. One, then, is often confronted with the reply, "but would you use assembly/Cobol?" to which the answer is, "of course, and it's not even uncommon, and if you don't know that, then you should learn more about the software industry before giving any more Aristotelian arguments."
- lmm 9y ago> if the extent of the imagination is languages like Idris and ideas like effect systems, that follow a gradient descent from Java, and always in the same direction: being able to express more constraints. I don't think that's a fair reflection of what these languages feel like. When your constraints mean that only the right thing can be done, you can make the thing implicit. The things that are tacit when humans talk about the problem can be tacit in our programming as well. You have ways to factor out concerns that are separate, even when they are entangled. "Better decomposition of the problem" doesn't sound exciting, but ultimately that's the very essence of programming. I don't think we need new grand ideas, at least if we're just talking about the next 50 years of industrial programming; I think we need to follow through on the ideas we already have, and I actually think that gradient ascent from Java will happen, and will move the industry forward, even if it ends up being a lot slower than I'd like. > How do you even know that we can do much better? NASA engineers may not like it, but they don't complain that we're "stuck" at sub-light speeds. Maybe Brooks was right and we are close to the theoretical limit (that we know must exist). I think we can go at least one or two substantial steps better than Idris: I want Noether's levels of stratification (beyond just total/not-provably-total), and I want Rust-style linearity, not as a specialised capability but as something integrated into the regular type system. But even if Idris is the limit, it's still a big step ahead of Java, and it's going to take the industry a while to make that step. (Maybe it will have to be two or three steps to get there - it feels like most of the industry is only just adopting the things that OCaml offered, and not yet familiar enough with them to appreciate what Haskell offers above that. And I can't blame them - I only have an appreciation of those things because I've been able to work for a long time in Scala and very gradually work my way up towards using the less familiar facilities). "The future is already here — it's just not very evenly distributed." > Can you find another useful way, available to us today, of talking about languages? Yeah, that's the problem :(. The whole industry is a huge iceberg in terms of what's visible about the practice of programming versus what's actually happening. I'd like to see more programming happening in public - which I think probably means more publicly-funded programming (I was thinking about this a few days ago in the context of research and scientific code - we have a relatively good system in place for providing grants for research, but we're a lot less good at funding the infrastructure that's used for research - we end up with a lot of researchers repeating the same work because they're only ever funded for a specific project, rather than being funded to produce something that's useful for many research projects). What makes sense in an open-source webdev project is all that most of us ever see about most languages, and while it's a lot better than nothing it's still a seriously distorted picture of what most programmers are actually doing.
- pron 9y ago> When your constraints mean that only the right thing can be done, you can make the thing implicit. Except that sometimes, when you think about the practical issue long and hard enough, you can find that some constraints need not be stated at all, and can be completely factored out of the language, at least in most cases. For example, GC removes resource management out of the equation (it's not always the right solution, but it is the right one in a large enough portion of software). Or, while FP people pore over effect systems and how to constrain effect, languages like Eve that adopt synchronous programming (which is based on ideas from temporal logic), get a mathematical framework in which effects and computation are one and the same, and effects don't pose a challenge to begin with. > I actually think that gradient ascent from Java will happen, and will move the industry forward Perhaps, but I doubt it's in the direction pointed to by Idris. We have much better ideas around. The author of the slides mentioned only the segment of PL research that he find appealing. Other segments may have some more promising ideas. > I think we can go at least one or two substantial steps better than Idris: I want Noether's levels of stratification (beyond just total/not-provably-total), and I want Rust-style linearity, not as a specialised capability but as something integrated into the regular type system. But even if Idris is the limit, it's still a big step ahead of Java, and it's going to take the industry a while to make that step. I think you have fallen in love with a specific formalism (I've fallen in love with others) and can only see progress within it. If you take a step back, ignore formalism altogether and ask yourself -- or better yet, conduct research -- on what are the actual problems in programming, you may find solutions in completely different directions. > it's still a big step ahead of Java I don't think so, and I don't know why you'd think that. I'm not even sure that Java isn't the limit (modulo small improvements). Of course, when I say something is a big step ahead I don't mean that I enjoy it more or that it can pull some more technical tricks, but rather that it reduces development costs by 30%. If Idris is a big step ahead of Java, by how much do you think costs at, say, Google or Amazon or Citibank would drop if they decided they would all switch to Idris tomorrow? I'm fairly certain that it wouldn't be anywhere near 30%, and I'm not even sure costs wouldn't actually rise. > it feels like most of the industry is only just adopting the things that OCaml offered, and not yet familiar enough with them to appreciate what Haskell offers above that. I see it not as progress but as change in fashion. Tastes change, and so people adopt some ideas. Have productivity levels risen in the past three decades? Significantly less so than even Brooks's prediction, which was considered overly pessimistic.
- mrkgnao 9y ago> What you get "for free" from such languages may not be significant enough to justify the cost of adoption Idris can often infer entire functions from their types if the domain is amenable to accurate type-based specification. For instance, taking the common "sized vector" example, where `Vec n a` refers to a length-n vector of values of type a, functions like zip : Vec n a -> Vec n b -> Vec n (a, b) can be automatically generated via the interactive "proof search" mechanism that the Emacs integration for Idris provides. Similar things are possible in Agda, which is however squarely aimed away from the "practical use" market.
- pron 9y ago> Idris can often infer entire functions from their types if the domain is amenable to accurate type-based specification. This is a great example of what I'm talking about. The kind of functions Idris can generate is that of functions that you could manually write with only marginally more effort -- if that -- than the effort required to write the precise type. I don't think those functions ever form a significant portion of a significant program, if at all (those functions must be so generic, or else there would be a search problem that Idris can't solve, that they would already likely be in the standard libraries). When Idris is able to generate an efficient sorting function given some constraints, then I'd be impressed. > can be automatically generated via the interactive "proof search" mechanism If you've spent a significant amount of time with such proof assistants, you'd see that the proof search is rather pitiful.
- bjz_ 9y ago> If you've spent a significant amount of time with such proof assistants, you'd see that the proof search is rather pitiful. Afaik, Idris' proof search was hacked together in an afternoon just to see if it would work. And it did, surprisingly well considering. Don't know how much it has been worked on since then though. But yes, still leaves a bit to be desired compared to other systems.
- pron 9y agoI wasn't just talking about Idris. There isn't a single tool out there that can automatically prove that your quicksort implementation actually sorts without pretty significant work.