←back to thread

170 points signa11 | 1 comments | | HN request time: 0s | source
Show context
fire_lake ◴[] No.41085430[source]
I thought that ANF is considered a dead-end?

Now the main choices seem to be CPS (which is seeing a bit of a resurgence!) and SSA.

So why teach ANF?

replies(3): >>41085488 #>>41085543 #>>41087918 #
asplake ◴[] No.41085488[source]
“I want students to feel the pain of working with non-SSA programs before the course introduces SSA. This frustration can help motivate why SSA is the modern consensus.”
replies(1): >>41086072 #
1. fn-mote ◴[] No.41086072[source]
In case anyone else believed this was scarcasm, it is not. It is a direct and accurate quote from the article. Bril is not (always) SSA.

Here is a follow-up quote from the article.

> Unfortunately, this aftermarket SSA retrofit has been a huge headache. [...] I think my original design is fundamentally flawed; it was a mistake to treat phi semantically as “just another instruction” [...]. Bril’s SSA form needs a full rework [...]. It has been an interesting lesson for me that SSA comes with subtle design implications that are difficult to retrofit onto an existing mutation-oriented IL.

I don't know enough to know what to make of this and the accompanying bug reports. Perhaps just "stay away from Bril SSA"?