1. 18

  2. 4

    Side effects are super useful for debugging, telemetry, etc; artificially coloring your functions in this fashion is likely going to make it terrible for maintenance and operability. But good luck anyways!

    1. 3

      The function/procedure distinction is very old in programming languages, isn’t it? It’s something that Pascal and perhaps other languages of the 1970s had, that seems to have gone away by the time pretty much all of the languages in widespread use today were invented.

      It’s interesting that impure procedures in this language are deliberately barred from returning values. Haskell, a language that comes to mind has having a strict pure/impure distinction, doesn’t have this constraint - the IO type can be parameterized over an arbitrary return type, including unit IO () if a given impure function really has nothing meaningful it can return. I’m also curious how well this will work in practice, if this will make it into the final version of Bagel or if it’s something the author will find themselves changing later on in the development process.

      Either way, it’s cool that they’re trying out the idea; it’s good to have more people building programming languages and trying out new ideas in general.

      No null/undefined nonsense; nil replaces both

      Why not get rid of nil too? Option/Maybe types are a great idea and have become popular in a number of contemporary programming languages.

      Expressive if/else, possibly also a pattern-matching or expressive switch statement. Ternary operators suck.

      Great idea, this is definitely something I miss in Javascript and Python.

      Partial-application/currying supported for all functions and procedures, without special syntax

      Also a neat idea.