Skip to content

Simplify The Language through removing custom binders #30

@mariari

Description

@mariari

I thought of a really good trick that should simplify the alucard compiler quite a bit.

Currently I do some hacks to get around the fact I can't use CL's let. I have my own version def.

however what if, when I create a term of the language, instead of just creating it.

What if I gave each an unique object number, and thus when it gets duplicated

(let ((foo (+ 2 3)))
  (+ foo foo))

We can know the user really let it.

Thus I can have a pass that redoes the let with some basic analysis.

We can remove def from the language with this change in!

Note that we still have to emit to a real body as if a user writes

(progn
   (+ 2 3)
   (* 3 5))

the (+ 2 3) would get thrown away, if the (+ 2 3) does not emit, This means that we will likely lose information that our current strategy works with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestresearchThings to lookup and research

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions