Live data from Hacker News

Ask HN: How to study programming language theory as a non CS student?

news.ycombinator.com

11–20 of 28 posts

Re: Ask HN: How to study programming language theory as a non CS student?

#11

> I would love to understand programming languages on a more abstract level. Structure and Interpretation of Computer Programs (SICP) - https://web.mit.edu/alexmv/6.037/sicp.pdf To find out more about the decisions on language features just read material from the language creators and core contributors.

Agreed: building various flavors of interpreters (such as in SICP) is an effective way to gain an understanding of different abstract semantics and how they compare.

You might also like "Programming Languages: Application and Interpretation":

1st ed: https://web.archive.org/web/20150926000110/http://cs.brown.e...

2nd ed: https://web.archive.org/web/20210121232912/http://cs.brown.e...

Also recommend lurking on http://lambda-the-ultimate.org/ to find material that interests you.

Re: Ask HN: How to study programming language theory as a non CS student?

#12
post #9

You might find the following two books helpful; 1. Programming Language Pragmatics by Michael Scott. 2. Concepts, Techniques and Models of Computer Programming by Peter Van Roy, Seif Haridi.

Thanks! These are the types of books I am looking for. Do you know any books which explain the same principles but cover modern languages like Python, C++ and Scala? This would allow me to apply the knowledge more directly in my daily work.

Don't quite understand your question. I had assumed that you wanted to understand about various computation models as encompassed by the various categories of languages i.e. imperative/object-oriented/functional/logic/concurrent/etc. The above mentioned books cover that with the principles being transferable to any language you might choose to focus on.

Re: Ask HN: How to study programming language theory as a non CS student?

#13
> How to study programming language theory

I think the information you're looking for would probably come under the umbrella of "Programming Language Design", not "Programming Language Theory" (PLT). Discussions on language design would include topics such as object-oriented vs functional programming, static vs dynamic typing and, importantly, language usability.

However in my experience, PLT is almost entirely concerned with academic research into the properties of highly-advanced type systems. Most of PLT seems to be irrelevant even to the designers of industrial languages, let alone users of them.

Re: Ask HN: How to study programming language theory as a non CS student?

#14
There's not much theory (unless you want to do research). Common practical topics all base on history/cruft and "current vector"(like C, JavaScript, C++, Java, Python). In the end ability to solve problem wins and it's based on ecosystem size/polish mostly.

If you want fancier designs then look into less mainstream languages (elixir, pony, haskell, swift, rust, kotlin, ocaml, zig, julia, lobster). All of them have some innovations that try to solve common problems faced in (specific) software development or languages.

Generally tradeofs are between speed(runtime, compile), size, correctness and usability.

There are kinda two approaches to programming langs, one from CPU perspective(C) and other from math perspective(Haskell, Lisp, Prolog). There are also pragmatic langs for biulding bigger systems where readability and pragmatism is king (Java, Ada, Go) There's also handling of async/parallel stuff that's not well solved yet AFAIK but most developed is BEAM VM and Haskell/Pony.

To understand CPU perspective I can recommend book "CODE". Other perspecive probably SICP course.

I am average dev so maybe some lang researchers can provide more info.

Re: Ask HN: How to study programming language theory as a non CS student?

#15
post #13

> How to study programming language theory I think the information you're looking for would probably come under the umbrella of "Programming Language Design", not "Programming Language Theory" (PLT). Discussions on language design would include topics such as object-oriented vs functional programming, static vs dynamic typing and, importantly, language usability. However in my experience, PLT is almost entirely conce…

Thanks for the clarification. I am indeed more interested in Programming Language Design. Do you have pointers to intro texts which provide practical value?

Re: Ask HN: How to study programming language theory as a non CS student?

#16

There's not much theory (unless you want to do research). Common practical topics all base on history/cruft and "current vector"(like C, JavaScript, C++, Java, Python). In the end ability to solve problem wins and it's based on ecosystem size/polish mostly. If you want fancier designs then look into less mainstream languages (elixir, pony, haskell, swift, rust, kotlin, ocaml, zig, julia, lobster). All of them have so…

Thanks for the book recommendation. Just bought it.

Re: Ask HN: How to study programming language theory as a non CS student?

#17
post #15
post #13

> How to study programming language theory I think the information you're looking for would probably come under the umbrella of "Programming Language Design", not "Programming Language Theory" (PLT). Discussions on language design would include topics such as object-oriented vs functional programming, static vs dynamic typing and, importantly, language usability. However in my experience, PLT is almost entirely conce…

Thanks for the clarification. I am indeed more interested in Programming Language Design. Do you have pointers to intro texts which provide practical value?

You mention "Writing an Interpreter in Go" - are you familiar with the similar book, "Crafting Interpreters" [0]? It's highly recommended by many but, again, may be more implementation-oriented than you're looking for. In that case, here is a list of other books that its author seems to recommend [1].

Another thing I've found very helpful is to investigate the details behind how existing languages work. It's especially interesting to think about how language flaws are sometimes unavoidable consequences of the underlying design.

For example, you mention familiarity with Python. Dynamically-typed scripting languages are my area of interest, so I have spent time making sense of Python's object model [2], including things like the descriptor protocol. It's then interesting to compare it to Ruby's object model [3], which despite surface similarities actually works in a completely different way.

[0] http://www.craftinginterpreters.com/

[1] https://twitter.com/munificentbob/status/901543375945388032

[2] https://docs.python.org/3/reference/datamodel.html

[3] https://www.youtube.com/watch?v=X2sgQ38UDVY

Post reply on HN