News for hackers. Stuff that matters.
Re:JEP 295: Ahead-of-Time Compilation by adamnemecek on Thursday October 27, 2016 @02:52PM (#12808301)
The great language convergence is happening! It seems like everyone is moving to expressive statically typed, compiled, functional, oop languages. Not that I'm complaining.

This means that we might actually get a language that becomes the new c in terms of popularity.

Re:JEP 295: Ahead-of-Time Compilation by iyn on Thursday October 27, 2016 @02:58PM (#12808420)
I look at this as cyclic trends (I'm not sure if 'trend' is the right word here, but it's a good enough approximation) - as you've said, we're entering the cycle of 'expressive statically typed, compiled, functional' (not sure about oop), but soon the cycle will go back to the dynamic languages, because they are "faster when iterating on product" etc. But who knows, maybe we'll stay in current cycle forever? ;)
Re:JEP 295: Ahead-of-Time Compilation by galdosdi on Thursday October 27, 2016 @03:14PM (#12808660)
I don't think so, well, at least not entirely. :-)

Dynamic languages were attractive as an alternative to being forced to specify types all the time, even when it's "obvious." Nobody would have complained if type errors were pointed out for "free."

But type inference is getting popular (eg scala), which is showing people that you can have your cake and eat most of it too.

There's also a lot of little things like REPLs, runtime metaprogramming, blah blah, that used to be solely the domain of dynamic languages, but popular interpreters/VMs have gotten way better in the last decade or two (thanks, JVM) and shown that you actually _can_ have it all. There's no longer a big strong line between interpreted and compiled.

If you can make a statically typed language expressive and fast-to-iterate enough, which I think you can and we (mostly) have, then that kind of yanks the ground right out from under the feet of the dynamic languages, leaving them with no real reason to exist in the long run.

That said, there's something attractive to the unexperienced about being able to code in the laziest possible way, and I don't think platforms that deliver a tiny bit of value in the short run in exchange for massive payback in the long run will ever lose popularity, among new engineers who have not yet learned what it's like to maintain a large program. There will always be PHPs as long as there are students. And that's OK. You learn to do thing well by doing things poorly. But hopefully over time such tools will mainly be used for trivial and learning projects, not big mission critical things

Re:JEP 295: Ahead-of-Time Compilation by pjmlp on Thursday October 27, 2016 @04:22PM (#12809584)
> There's also a lot of little things like REPLs, runtime metaprogramming, blah blah, that used to be solely the domain of dynamic languages

If you go read the Xerox PARC, DEC and ETHZ papers you will find REPL goodies using static system programming languages with automatic memory management.

The Xerox ones even did correction suggestions when compiler errors happened.

Namely Mesa/Cedar, Modula-2+, Modula-3, Oberon and its descendants.

Re:JEP 295: Ahead-of-Time Compilation by AlphaSite on Thursday October 27, 2016 @06:42PM (#12811017)
Swift, Java, Scala, Haskell, Etc all have REPLs as well.
Re:JEP 295: Ahead-of-Time Compilation by pjmlp on Friday October 28, 2016 @01:38AM (#12813392)
Yeah, I was just trying to point out that it isn't something recent, rather all the way back to early 80's.

For example Oberon System 3 already had something in spirit similar to Swit Playgrounds.

Re:JEP 295: Ahead-of-Time Compilation by iyn on Thursday October 27, 2016 @03:55PM (#12809213)
I honestly hope you are right :)

I've been thinking about type inference in this context but I don't think that's enough to convert people to static languages. I agree that there is a general problem with the 'laziest possible way' to program as you put it - dynamic languages are way more forgiving that static ones. And while tools may evolve to make some things trivial, I think that there (almost) always be some areas where dynamic languages' forgiveness will be good enough reason for some people to use them. Today these are types but in the future there'll be something else to sacrifice.

Re:JEP 295: Ahead-of-Time Compilation by lomnakkus on Thursday October 27, 2016 @04:26PM (#12809634)
Just as a little addendum to that:

The theory of statically typed languages[1] is progressing while "dynamic" languages haven't actually had many real advances since e.g. Scheme[0] first appeared. Sure, there's small things around ergonomics, immutability (Clojure, especially), but really there's been very little true advancement[2].

Personally, I think either static (dependent) types will win[3] or we'll just end up implementing different custom static type systems ad-hoc[4]. My reason for having more confidence in the former rather than even more formal methods is that there are very few math-like/truly spec-level languages (e.g. TLA+) that can be mechanically translated to a meaningful program. We need something intermediate, but so far (to me!) Idris[5] has seemed like the only remotely credible contender in that you can pretty much choose arbitrarily how much provin' vs. how much assumin' you want to do.

EDIT: The current hype (in frontend especially) seems to be around 'gradually typed' languages like TS and Flow, but AFAICT they are basically just a very poor man's ad-hoc version of dependently typed languages. (Concretely TS/Flow do have a huge advantages in that it's really easy to introduce, but personally I had no problem transitioning gradually from ES6/traceur to Scala.Js/React just by adding strongly typed shims where appropriate. If your application is so tangled that you cannot introduce such shims in various places, it's probably tangled enough that you'll want to do a full rewrite anyway.)

[0] I think Scheme was the first to introduce first-class continuations. That was a pretty major advance in terms of expressing, for example, search algorithms by just rewinding to a previous continuation. Of course, since then "we"(Felleisen, specifically) discovered that delimited continuations are perhaps better -- but that was a 'refinement'.

[1] Aka: languages with more than one type.

[2] Of course, some might interpret (pun!) that as a sign that they're "perfect". However, we still get loads of bugs in dynamically typed languages, so surely there must be something to be improved upon, right?

[3] See e.g. "State Machines All The Way Down" at https://eb.host.cs.st-andrews.ac.uk/drafts/states-all-the-wa... (DRAFT)

[4] See e.g. "Type systems as macros" at http://www.ccs.neu.edu/home/stchang/pubs/ckg-popl2017.pdf (DRAFT)

[5] Since I'm already thowing around references, I'd also point to the "Elaborator Reflection" paper; PDF at http://davidchristiansen.dk/drafts/elab-reflection-draft.pdf ; video at https://www.youtube.com/watch?v=pqFgYCdiYz4 . It shows just how much provin' you can do with just a little bit of ad-hocness at compile time.

Re:JEP 295: Ahead-of-Time Compilation by greendragon on Thursday October 27, 2016 @04:29PM (#12809669)
I don't really see the cycle. I just see it as languages getting closer and closer to Lisp, as per usual. Turns out the static languages had a lot more growing up to do than the dynamic languages, so you're seeing 'big' changes like Java 7 through 9, C++0x through C++1y, new languages like Go, Rust, Nim, Scala... Meanwhile the only recent dynamic languages worth talking about are Clojure, and maybe Julia and Elixir. Across the field of dynamic languages though you see a little more movement to optional typing (and more powerful typing semantics like schema or protocol conformance or other things you can do with dependent types) and maybe some concurrency or JIT or AOT trinkets from other implementations that all boil down to performance improvements of some sort. The language design on the dynamic end has changed much less because they have less to change.
Re:JEP 295: Ahead-of-Time Compilation by adamnemecek on Thursday October 27, 2016 @03:02PM (#12808493)
Yeah it's an extinction event in the evolutionary cycle of computing. Im not sure when was the last one.

I think that excessive dynamism is getting less attractive when you account for all the costs it brings with it and that the vast majority of the benefits can be achieved with static metaprogramming, in a more readable and safer manner.

Re:JEP 295: Ahead-of-Time Compilation by pjmlp on Friday October 28, 2016 @02:01AM (#12813476)
When we lost type safety in systems programming to C and C++.
Re:JEP 295: Ahead-of-Time Compilation by rudolf0 on Thursday October 27, 2016 @03:14PM (#12808675)
So, everything is slowly converging on Scala? (Though of course none will reach the asymptote that is Scala's feature count.)
Re:JEP 295: Ahead-of-Time Compilation by paulddraper on Thursday October 27, 2016 @09:14PM (#12812106)
Or, hopefully, the asymptote that is Scala's compile times.
Re:JEP 295: Ahead-of-Time Compilation by duck2 on Thursday October 27, 2016 @03:22PM (#12808775)

    functional, oop
Do these have any intersection except Scala?
Re:JEP 295: Ahead-of-Time Compilation by Sharlin on Thursday October 27, 2016 @03:29PM (#12808862)
Depends on how exactly how functional you want to go, but latest versions of C++, Java, JavaScript, and C# definitely qualify. Rust, too, though it's not strictly OO. And Python, Ruby, Swift.
Re:JEP 295: Ahead-of-Time Compilation by belovedeagle on Thursday October 27, 2016 @04:34PM (#12809741)
If Rust is OO then the term is meaningless. No inheritance; dynamic dispatch only via explicit indirection (Boxed traits); methods are (therefore) just syntactic sugar for regular functions.
Re:JEP 295: Ahead-of-Time Compilation by qznc on Thursday October 27, 2016 @05:53PM (#12810610)
Lisp CLOS does not have inheritance for methods either, but is OO by definition.

Imho, OO is about polymorphism [0] and Rust provides that.

[0] http://beza1e1.tuxen.de/articles/oop.html

Re:JEP 295: Ahead-of-Time Compilation by lispm on Friday October 28, 2016 @04:06AM (#12813914)
Common Lisp has inheritance of methods, but it does not work on a class hierarchy directly. When a generic function gets called, the applicable methods are being ordered based on the classes of the arguments - not just one argument, but possibly many. A more specific method can call the next method. In some cases this is done automatically. This is inheritance, based on the class hierarchy.

CLOS also allows the developer to implement other inheritance mechanisms, by developing his own way to combine the methods of a generic function.

Re:JEP 295: Ahead-of-Time Compilation by belovedeagle on Thursday October 27, 2016 @06:03PM (#12810701)
Rust fails many of the other tests mentioned. As for polymorphism, is Haskell OO? If so, then I think my claim that the term is meaningless is justified.
Re:JEP 295: Ahead-of-Time Compilation by qznc on Friday October 28, 2016 @01:51PM (#12818715)
This is the punch line. Once you have a definition of OO, which fits all languages usually considered OO, the definition also fits Haskell. :)
Re:JEP 295: Ahead-of-Time Compilation by dfox on Thursday October 27, 2016 @09:32PM (#12812238)
CLOS effectively does have inheritance for methods because for sane specializers subclass matches everywhere where it's superclass matches. One can in fact view the CLOS mechanism of specializers and effective-method composition as more flexible mechanism for inheritance than traditional implementations of OOP.
Re:JEP 295: Ahead-of-Time Compilation by jjnoakes on Thursday October 27, 2016 @05:24PM (#12810341)
I disagree; with encapsulation, polymorphism, and composition, Rust seems OO enough to not make the term "meaningless".

At least, not according to the widely used definitions I've read of OO.

Re:JEP 295: Ahead-of-Time Compilation by belovedeagle on Thursday October 27, 2016 @06:05PM (#12810713)
All of these things are found in Haskell as well; it's not OO by any stretch of the imagination. You're confusing "oop language" with "modern programming language".
Re:JEP 295: Ahead-of-Time Compilation by jjnoakes on Thursday October 27, 2016 @11:07PM (#12812709)
Re:JEP 295: Ahead-of-Time Compilation by bad_user on Friday October 28, 2016 @12:35AM (#12813128)
If Rust is FP then that term is meaningless too ;-)
Re:JEP 295: Ahead-of-Time Compilation by agumonkey on Thursday October 27, 2016 @03:48PM (#12809128)
Does OCaml counts ? the OO layer is actually pretty interesting.
Re:JEP 295: Ahead-of-Time Compilation by wtetzner on Thursday October 27, 2016 @05:03PM (#12810097)
It's funny, OCaml's object system is actually quite good, but it doesn't really get used much because, well, why use objects when you have ML?
Re:JEP 295: Ahead-of-Time Compilation by agumonkey on Thursday October 27, 2016 @05:10PM (#12810184)
Yes that's a nice Cobra Effect.
Re:JEP 295: Ahead-of-Time Compilation by stass on Thursday October 27, 2016 @04:45PM (#12809901)
And don't forget Erlang as well.
Re:JEP 295: Ahead-of-Time Compilation by jahewson on Thursday October 27, 2016 @05:48PM (#12810570)
OCaml, which is now 20 years old. The "O" was originally for "Objective".
Re:JEP 295: Ahead-of-Time Compilation by brianwawok on Thursday October 27, 2016 @03:28PM (#12808859)
F#