nevalang / neva

🌊 Flow-based programming language with static types and implicit parallelism. Compiles to native code and Go
https://nevalang.org
MIT License
85 stars 7 forks source link

Get rid of "Configuration Message" abstraction #685

Open emil14 opened 1 week ago

emil14 commented 1 week ago

RN only 2 components needs this

  1. Field
  2. New

This conception was originally introduced to implement constant network senders (and New - their implementation). Later it was also reused to implement struct selectors (and, respectfully, Field).

The thing is Field can (with some performance overhead) be implemented without config message (see #683) while New is not. New really needs something else because it doesn't have inports.

So, if it's only case for New isn't cfgMsg too big abstraction? Too generic, too universal? How about doing the same as we do for Panic? We could e.g. inject "ConstantMessage" into ctx. On the level of IR we can keep cfgMsg abstraction as is though.


Related to #683 and #684