Live data from Hacker News

Introduction to Programming Languages

hjaem.info

1–10 of 11 posts

Re: Introduction to Programming Languages

#5
post #4
post #2

[flagged]

Is Scala actually special for doing this? Would Python equally work or JS / C wouldn't work because types?

Implementing a programming language is very easy when you have pattern matching and algebraic data types (which implies types). Python, JS, and C lack some or all of these. Scala is not special in this regard, though. Any modern language with FP ancestry will have these features.

Re: Introduction to Programming Languages

#6
post #4

Earlier quoted context omitted.

Is Scala actually special for doing this? Would Python equally work or JS / C wouldn't work because types?

Implementing a programming language is very easy when you have pattern matching and algebraic data types (which implies types). Python, JS, and C lack some or all of these. Scala is not special in this regard, though. Any modern language with FP ancestry will have these features.

So its good because of Scala's ability to implement a programming language and not Scala's language itself being good on its own for general abstract sudo like code. Or does Scala write cleanly (like people say Python does) and is also elegantly able to expands it's own simple syntax?

It bugs me how languages like JS are clean but any custom domain-specific language made in them is ugly.

Re: Introduction to Programming Languages

#7
post #6

Earlier quoted context omitted.

Implementing a programming language is very easy when you have pattern matching and algebraic data types (which implies types). Python, JS, and C lack some or all of these. Scala is not special in this regard, though. Any modern language with FP ancestry will have these features.

So its good because of Scala's ability to implement a programming language and not Scala's language itself being good on its own for general abstract sudo like code. Or does Scala write cleanly (like people say Python does) and is also elegantly able to expands it's own simple syntax? It bugs me how languages like JS are clean but any custom domain-specific language made in them is ugly.

For the authors of this book, I imagine it was a combination of Scala having the features they wanted, plus it being relatively popular, easy to install, and having good tooling.

I've written a lot of Scala in the last 15 years or so, and I really like the language. It has features that most programmers are not familiar with, which can scare off some. My opinion is that if you understand the features it is a very elegant and simple language, particularly Scala 3.

Re: Introduction to Programming Languages

#9
post #8

Should be called "Introduction to Functional Programming Languages"

The order is which things are covered is pretty standard for programming languages. Chapters 11 and 12 cover mutation. PLAI (https://www.plai.org/) covers similar material in a similar order.
Post reply on HN