Skip to content

A number of potential proposals #26

Description

@Qata

Hello again!

I keep making detailed proposals for things where I either missed something or there's a good reason it can't work.
So I figured I should just do a rapid fire list and then things can easily be shot down without wasted effort.
If any of these strike you as potentially worth including, I can make a full proposal with pros/cons/considerations.

  1. Making = optional in the definition of functions (or giving it a specific error message). Embarrassing to say but out of everything in the language, accidentally forgetting the = was what most tripped me up when I started writing Juniper.
  2. A constraint keyword e.g. constraint ConstrainedType = { field : uint8 }, which would allow writing fun myExample(arg : a) : b where a : ConstrainedType.
  3. Inline type annotation e.g. (float)0.0, allowing distinguishing between polymorphic constrained values, like the two floating-point types.
  4. Function overloading, which I believe is allowed in C++ already.
  5. Module extensions, e.g. extends module List.
  6. Full dependent types
  7. Unique types
  8. Linear types
  9. f and d suffixes for floating point literals.
  10. A non-sized (linked?) list type
  11. String interpolation e.g. let a = 10u32; "Value: \(a)" that compiles to use snprintf.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions