Elixir 

Oooh, so put_in, get_in and update_in are basically lenses. That's pretty cool

I don't like to rely on macros but it certainly is convenient

re: Elixir 

@socks out of curiosity, what do you not like about macros?
-F

Serious reply, re: Elixir 

@Felthry They make it very difficult to debug when something is wrong. It's not a problem at all when it's something built into the language's standard library and thoroughly well-tested but as soon as you step out of that, you're walking on thin ice

re: Serious reply, re: Elixir 

@socks I'm guessing in this context it means something more complicated than how people typically use C preprocessor macros, then?

oh and assembler macros are hard to program without, i don't want to have to remember which memory location we stored this variable in and every location we referenced it in case we have to change it
-F

re: Serious reply, re: Elixir 

@Felthry Well yeah, that stuff is handled by language constructs themselves usually. By macros I basically mean code that is autogenerated at compile time

In Elixir they're used all over the place, and they're very convenient but I don't trust user-defined macros. In Haskell you see it in libraries like Persistent for example, where typing out the definition of a database table with Haskell functions is very tedious and you wanna automate it to some extent

Follow

re: Serious reply, re: Elixir 

@socks ah, so like the GENERATE block in VHDL! yeah we find those annoying to comprehend and debug too
-F

Sign in to participate in the conversation
Awoo Space

Awoo.space is a Mastodon instance where members can rely on a team of moderators to help resolve conflict, and limits federation with other instances using a specific access list to minimize abuse.

While mature content is allowed here, we strongly believe in being able to choose to engage with content on your own terms, so please make sure to put mature and potentially sensitive content behind the CW feature with enough description that people know what it's about.

Before signing up, please read our community guidelines. While it's a very broad swath of topics it covers, please do your best! We believe that as long as you're putting forth genuine effort to limit harm you might cause – even if you haven't read the document – you'll be okay!