:: krowemoh

Thursday | 26 DEC 2024
Posts Links Other About Now

previous
next

Four Languages from Forty Years Ago

2022-08-28

These are my notes on the talk Four Languages from Forty Years Ago by Scott Wlaschin.

https://www.youtube.com/watch?v=0fpDlAEQio4&t=4s

Introduction

Alan Perlis said the famous:

"A language that doesn't affect the way you think about programming, is not worth knowing."

He was part of the team that created ALGOL. I have seen this quote many times now but this is the first time I actually looked into who Alan Perlis was and took to heart maybe I should learn more languages. There is also a post about the Ur 7 languages that I also have saved.

1960s

- First high level language ever.

- The perfect language :) -> Read worse is better.ALGOL - Foundation of all modern languages like C and PascalBASIC - A language for beginnersPL/1 - The final programming language, famous last wordsISWIM - Never implemented but everyone who read it implemented their own language. This is the basis of foundational languages and first language to use indentation for scope!

- First every write only language, notation as an aid of thought.

- First language with classes and inheritance.BCPL - First language with curly braces.Logo - Designed for children.ALGOL68 - Successor to ALGOL, influential.

1970s

- Thinking Forth, concatenative programmingPascal - ALGOL68 for the massesC - The parent of the most popular languages today.

- Logic programming

- Functional programming

- Relational database languageCLU - Abstract data types, iterators and exceptionsScheme - Lisp for the massesMSFT Basic - Program a personal computer

- Interactive IDE, VM, Garbage collection, real object oriented.Modula-2 - Golang of the 70s

X - Grandparent of the most popular language ever.

Paradigms that are still dominant:

Imperative-ProceduralObject orientedFunctionalSymbolicLogicStack Based

These are still valid today, so programming languages stabilized in the 80s and there hasn't been much wild changes now.

SQL

Before SQL, everyone had their own language they used and everything was proprietary. Everything is set operations. Everything is an expression, so you can run a query and that result in turn can be queried against again. The ternary operator is a way to make statements into expressions. Interesting. This makes everything more composable and reduces bugs. Bugs like initializing variables and making sure the else cause is filled.

The other is SQL is a WHAT programming language. All it says is I want something and it doesn't care how it gets that data. Very similar to how APIs work. All they give is data. The consumer doesn't care how it that data is found.

SQL is actually a combination of a query language, an insert/update language and a table creation language. This is similar to how UniVerse structures the manuals. I never noticed that. There is the query language manual and then one for the retrieve language. This is the select portion vs the rest of the TCL commands.

Prolog

Programmation en Logique

This was the European answer to lisp. Everything is a fact or a rule. Prolog is like in SQL where it is declarative. Datalog is prolog like. It looks intense.

The speaker demoed a very short Sudoku solver which looks magical. By defining the rules and the facts, you can get the language to simply solve your problem without actually writing all the code yourself. This is very weird. I don't get how it works but it must come down to the prolog implementation. The author also recommends if you have some sort of rule based thing you need or some sort of constraint solver, that it may be a good idea to use prolog and then call it from your other code.

This is actually a really good idea and one that I'll need to think about. Even in general. I already have stuff at work that would benefit from being a black box constraint solver. I need to look into prolog.

https://learnxinyminutes.com/docs/prolog/

https://www.swi-prolog.org/

http://www.let.rug.nl/bos/lpn/

ML

Meta language. This seems to be very much like haskell and other functional languages. The big thing seems to be that it is useful for type systems and making inferences. Something like that would be really great for Rust which can end up with some really complex types that the compiler spits out as error messages.

It also seems like it has sane defaults.

Smalltalk

The magical smalltalk, I had hoped to get blown away by it but as cool as it looks it doesn't actually look that cool. I think it might be one of those things that you just need to try to get it.

Language X

The answer was visicalc! Lol, This was the grandparent of excel and damn the idea of excel as a programming language and being super useful is interesting as this video came on the heels of the Joel video.

Overall a good video, as you can tell I watched the rest of the video in bed so my notes are far less. I think the big thing is trying out prolog as a constraint solver would be very useful for work. I'm currently working on allocation software and all it is is a bunch of rules and facts but writing it in BASIC is complex and bug ridden and it doesn't help there is no enforcement of data at the database level.

Bah!