Login
You're viewing the mstdn.social public feed.
  • Jul 2, 2026, 1:21 PM
    unrefined thought: i think a lot of the appeal of ruby (and likely other dsl-able languages) is how fluently an api can "flow" from imperative to declarative

    in a lot of languages you get to declare a Structure and maybe Function but anything else you have to do imperatively. you can work around this with Clever Design but the imperative roots of the syntax (e.g. function call parens,
    new Xyz( structure initialization syntax) still show up which can make things look clunkier

    like, in the same file you can declare what makes a structure valid
    and define the operations that can exist in it, i think that's quite interesting but i GUESS it's too much "spooky action" or whatever when you're able to leave out the parenthesis on a function call

    or, like, take a dsl that writes html from function calls instead of returning a struct or whatever. that's technically declarative, and then you can Just wrap a section of it in a for loop (imperative?). i just think that's kinda cool and wish languages with less overhead let these happen instead of overcorrecting too far
    💬 2🔄 7⭐ 0

Replies