dimitriv / Ziria

A domain-specific-language and compiler for low-level bitstream processing.
92 stars 18 forks source link

Define function within a function in Expr language #33

Closed bradunov closed 9 years ago

bradunov commented 9 years ago

Currently we can define let comp locally within a let comp but we cannot do the same for let. For example, we cannot write:

let f(a:arr int) = let g(x:int) = return x in return g(0) in

read[int] >>> emit f({1,2}) >>> write[int]

dimitriv commented 9 years ago

I strongly disagree with this. It adds complexity to all parts of the compiler that have to handle this for absolutely no functionality or performance benefits that I can see. E.g. we can't pass functions to other /expression/ functions. So what's the point? I strongly suggest we close this ticket and forget about this (and Edsko removes the local function definition in expressions from yesterday's patch.) We want a simple language, the simplest possible. @bradunov @edsko

edsko commented 9 years ago

Closed as wont-fix.