Live data from Hacker News

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

news.ycombinator.com

1–10 of 28 posts

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

#1
Hi, I would love to understand programming languages on a more abstract level. What do they have in common and why? Why has language A feature A but not feature B?

I am an EE/Robotics student and program everyday but I feel like am lacking some deeper knowledge about programming languages which holds me back from becoming a better developer.

What course/book can you recommend?

EDIT: I have written quite a bit of code in Python (Pytorch/Tensorflow), do my coding interviews in C++, and also have experience in web dev with JavaScript (NextJS). I am looking for a CS50 like course. I was thinking of going through the "Writing an Interpreter in Go" course. But would rather learn something less implementation oriented.

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

#3
> 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.

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

#4

There is the Harvard CS50 class. There are also millions of pages on things like python vs javascript, react vs angular . Developers have lots of opinions so you shouldn't find it too hard to find out why languages have different features.

CS50 is great but it isn't about programming languages.

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

#5
I would say that the best way to start understanding the different programming languages is not by leaning a generic course about programming languages features, but to pick one read about it and try to write a short project and then switch to another different language.

I would start with a low level language like C, then move to a more higher level like Java and finally end with a more "modern" language like Rust or Go.

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

#6
I am Mechanical Engineering graduate pursuing my Masters in Software Systems after 10+ years of industry experience.

Attack the Type System first. Do not read PhD research papers, just the practical aspects of it:

- Why is it that integers I am working with are 8-bit (or 16-bit or 32-bit ...)?

- What is "int x = 7;" translated into by the compiler?

- How is basic arithmetic implemented in the hardware? Integers, floating point etc.

- If my system has 16-bit integers, for example, how can I deal with larger numbers than what 16 bits can accommodate? Some SW implementation to hide HW limitations?

Then go on to understand how more complex types are implemented etc.

From there go on to things like Stack Frames and Heaps and Application Binary Interfaces.

From there go on to memory clean up and why we need Garbage Collectors etc.

...

To me, a Programming Language is a set of rules (enforced by a compiler or interpreter) for deterministic bits manipulation. The Type System is the core set of rules around which everything else revolves. Even lack of a Type System in a language is a Type System.

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

#8

> 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.

Thanks, that's kind of what I am looking for. Do you know an intro text which is a bit more concise?

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

#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.

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

#10
post #5

I would say that the best way to start understanding the different programming languages is not by leaning a generic course about programming languages features, but to pick one read about it and try to write a short project and then switch to another different language. I would start with a low level language like C, then move to a more higher level like Java and finally end with a more "modern" language like Rust o…

Good advice to get started. I think I am past that point already. I use C++ for coding interviews, JavaScript (NextJS/React) for web dev side projects and Python (Pytorch/Tensorflow) for my research work.
Post reply on HN