dahart 5 hours ago

I’m curious - what is Dylan really for? Who should use it, and in what situations? I totally could have missed something obvious, but I read through the intro and the ‘Tour’, and it has a lot of detail about what the language is, but not much on when and where to use it. The closest thing seems to be it’s LISP but faster? What are the reasons to choose Dylan over C++, Swift, JavaScript, or Python?

  • patrec 3 hours ago

    Dylan is simply a historical curio, so there are no situations in which anyone should use it apart to study programming language history and to take inspiration from roads not taken. It's basically Common Lisp, with Algol-like syntax, less historical baggage (everything is a class, no weird stuff like prog and so and so forth) and more emphasis on efficient implementation. Unfortunately, it didn't catch on, but it's IMO a nicer language than python (which modelled inheritance rules on Dylan), Java, Javascript or C++.

    Here are some interesting things about it:

    1. It has an simple but nice trick for avoiding ugly_underscores: a-b is a single symbol, a - b is subtraction.

    2. IIRC it was the first non-sexp language with a sophisticated macro system.

    3. Like Common Lisp it has multi-methods and resumable exceptions (but unlikely Common Lisp all exceptions are resumable). If you want to play around with either multi methods and resumable exceptions, Common Lisp or Dylan are probably your best bets and Dylan has the advantage of being probably simpler to pick up.

    • pjmlp 3 hours ago

      Some of the Dylan's ideas live on Julia, though.

      Which has had a good adoption story thus far.

      https://info.juliahub.com/case-studies

      • patrec an hour ago

        Great point – I should definitely have mentioned Julia as your best bet for playing around with multi-methods. I think it's basically the only language with any eco-system to speak of that has them. Julia also happens to be the only extant language I'm aware of that has a well designed shell interpolation syntax. For resumable exceptions, however, playing around with Dylan or CL remains your best bet, as far as I'm aware of (and Common Lisp at least also integrates them into the interactive development experience).

      • emorning3 an hour ago

        Excellent point. Multi-methods are awesome.

Neywiny 6 hours ago

I'll say this because it's possible to go from my username to name anyway: I share a name with this language. And usually that's fine because it's not very widely used. But seeing this headline was certainly a surprise on an otherwise calm Sunday morning.

emorning3 2 hours ago

I remember Apple giving away Dylan CDs when Java was first released. I learned them both and went with Java. But I should have taken the opportunity to also learn the Common Lisp Object System.

These days we like to bitch about OOP languages, but we could have had better.

mdaniel 3 hours ago

> The canonical "Hello World" program in Dylan.

  // File library.dylan:
  
  Module: dylan-user
  
  define library hello
    use dylan;
    use io, import: { format-out };
  end;
  
  define module hello
    use dylan;
    use format-out;
  end;
  
  // File hello.dylan:
  
  Module: hello
  
  format-out("Hello!\n");
Give me a break, that is the most insane hello world I have very seen in my life, and I've seen brainfuck. The idea that one must also `use dylan;` in every file in a language named dylan is just stupid, going the extra mile to appear to the untrained eye to be an unused import since the next line is the import that actually matters
NeutralForest 4 hours ago

Looks fun!

  • postepowanieadm 4 hours ago

    Makes one wonder why it didn't succeeded.

    • Jtsummers 4 hours ago

      It wasn't ready in time for the product it was primarily intended to support, the Apple Newton, which was itself a flop in the market. If it had finished in time and the Newton hadn't been a flop, it could have been like Objective-C's move in the market with iOS (and earlier with NeXT and OS X but that was still pretty small compared to what iOS did to the language's popularity). A language buoyed by a popular platform. But that didn't happen.

      • pjmlp 3 hours ago

        Actually the Dylan group finished the prototype earlier than the C++ group, on the internal competition between both groups, but apparently politis won.

        There are some old posts on HN from Newton team folks.

    • NeutralForest 3 hours ago

      I don't know the story but why does a language ever fail? Lack of good tooling support, lack of buy-in from large projects, lack of use-cases, crowded market, etc. Not only does every new language (at the time) need to have similar ergonomics to the existing landscape, they also need compelling features to escape the inertia that keeps developers within one ecosystem.