Tensegritics / Tensegritics/ClojureDart

automatic map spreading on interop calls with named parameters

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement interop short-term
Dominant language
Clojure
Stars
1.6k
Forks
119
PR merge metrics
No merged PRs in 30d

Description

When a method, function or constructor expects named parameters but that it receives an odd number of arguments (positional ones not counted) then the last argument is considered to evaluate to a map and is replaced by all missing parameters being passed valued looked up in the map.

It must be taken care of:

  • evaluating the map argument only once
  • re-emitting default values; problem is that some default values depend on private lib elements and so can't be injected in user-code, we should warn in such cases and treat them as required (unless nullable which is unlikely)
  • throwing an error at compile time if the call site is dynamic.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named; begin by locating the compiler code that handles Clojure-to-Dart interop calls and named parameters. The work is complete when map spreading handles evaluation and defaults as described, warns for inaccessible private defaults, and rejects dynamic call sites at compile time.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, dart
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.