Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Any source language can be said to be a simple transformation of its target language

Not always. There are a number of language features that have non-local implications, such as pattern matching, lazy evaluation, continuations, or exceptions. If you implement such a feature on top of a language that doesn’t have it, you will have decidedly complex transformations.

I agree that it’s overly simplistic to suggest that it isn’t a full language if it only involves local/simple transformations, but the question of local vs. non-local transformations at least hints at the idea that a new paradigm or way of thinking about programming is involved.



Nit: I think pattern matching would be local the way you are using the term; pattern matching is(/would be) implemented right at the site you use it with some form of if/else clauses that would be verbose, but obviously related to the original code. Your other three examples definitely involve large-scale "non-local" source transformation all over the place to implement them.

I say this because it took me a moment to figure out how those four things went together.


Clojure's core.match is implemented as a macro with almost exactly the technique you mention. It spits out a decision tree built out of conds.


the question of local vs. non-local transformations at least hints at the idea that a new paradigm or way of thinking about programming is involved.

Which is an excellent point, and I think the essay would have been better served if you had oriented it that way, and not around the "not a language worth learning" hook.


I think that essay would be even better than this one. Thanks!


I took part in a discussion of this idea about a month ago: http://news.ycombinator.com/item?id=3198941 There's a paper in there you would want to read as research for that essay.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: