Show HN: I made a (terrible) programming language
jsnider3.github.io
jsnider3.github.io
As far as dynamic languages go, having every statement block return an expression, or the last expression evaluated, is not so rare, but having access to it is. In terms of static languages, it just might be that that information is discarded.
Also, I have to say that this project is really well documented.
Personally, I think having everything be a single expression is actually a really great idea, I call this language "terrible" mostly because I can easily come up with ways to improve it, such as making a stdlib and allowing you to index into dictionaries with expressions and not just string constants, but doing so would take too much time away from other, more practical, projects.
My secondary reason for calling it terrible is the dynamic scoping, which I personally believe makes it hard to debug, allows for bugs to be introduced from far away, and makes life hell for optimizing compilers.
I'm not sure what the difference between every block returning an expression and having access to it is; can you clarify?
Good documentation is really something that's been beaten into me by getting a full-time job as a software engineer. Partly through coworkers giving a hard time during code reviews to poorly documented code, partly through trying to maintain decade old spaghetti code and realizing how much it sucks when there's no documentation, and partly through realizing how much of the job is about good communication.
I only bring it up because I'm in the process of writing an interpreter and I was surprised to see values printed at the end of for-loops, because assigning the last value to the iterator counts as a statement/expression.
Fair points.