{"id":15293097,"url":"https://github.com/dotlin-org/dotlin","last_synced_at":"2025-10-07T06:30:31.872Z","repository":{"id":60400961,"uuid":"434960829","full_name":"dotlin-org/dotlin","owner":"dotlin-org","description":"Kotlin to Dart compiler","archived":true,"fork":false,"pushed_at":"2024-03-06T14:30:02.000Z","size":5873,"stargazers_count":223,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-06T05:37:12.841Z","etag":null,"topics":["compilers","dart","kotlin","transpilers"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotlin-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"wilkomanger"}},"created_at":"2021-12-04T17:06:56.000Z","updated_at":"2024-12-03T10:12:19.000Z","dependencies_parsed_at":"2023-02-19T02:46:08.002Z","dependency_job_id":"a750b5a4-41f8-4f53-8f80-b77426722767","html_url":"https://github.com/dotlin-org/dotlin","commit_stats":{"total_commits":387,"total_committers":3,"mean_commits":129.0,"dds":0.02067183462532296,"last_synced_commit":"f922d32a6d2e12ff3eb27d69fce031b1fdf5cbf0"},"previous_names":["dotlin-org/dotlin","dirtlang/dirt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotlin-org%2Fdotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotlin-org%2Fdotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotlin-org%2Fdotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotlin-org%2Fdotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotlin-org","download_url":"https://codeload.github.com/dotlin-org/dotlin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235599556,"owners_count":19016190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compilers","dart","kotlin","transpilers"],"created_at":"2024-09-30T16:39:48.227Z","updated_at":"2025-10-07T06:30:26.257Z","avatar_url":"https://github.com/dotlin-org.png","language":"Kotlin","readme":"![Dotlin logo](docs/assets/dotlin.png)\n\nDotlin is a Kotlin to Dart compiler. The aim is to integrate Kotlin as a language\ninto the Dart ecosystem, combining best of both worlds: The Kotlin language \u0026 standard library,\nand the Dart ecosystem \u0026 build system.\n\n## About Dotlin\n\nDotlin makes use of Kotlin's IR (Immediate Representation) compiler, and uses that to generate Dart source code.\n\nDotlin is still in development. You can track overall development on the [project board](https://github.com/orgs/dotlin-org/projects/1).\n\n## Features\n\n- Supports all Kotlin language features (WIP: [#25](https://github.com/dotlin-org/dotlin/issues/25))\n- Supports the Kotlin standard library (WIP)\n- Use any dependency written in Dart, without conversion or writing type definitions (WIP)\n- Integrates with Dart's build system (use `pubspec.yaml` to define dependencies)\n- Generates code that is still readable and pleasant to use for Dart consumers (WIP)\n\n## Differences from Kotlin\n\nDotlin is a _dialect_ of Kotlin. Some changes have been made to better integrate into the Dart runtime, and\nalso to remove some JVM-centric legacy traits.\n\nNote that because of these changes, Dotlin code is _not_ compatible with Kotlin/JVM, or other official Kotlin\nvariants. Dotlin aims to intergrate the Kotlin language (and stdlib) into Dart, not the full Kotlin ecosystem.\n\n### No type erasure\n\nBecause of the Dart runtime, there is no type erasure. This means that you will never need to use `reified`\nin Dotlin.\n\nFor example, the following code, which would fail in Kotlin, works in Dotlin:\n\n```kotlin\nclass MyClass\u003cT\u003e\n\nfun test(arg: Any) {\n    if (arg is MyClass\u003cString\u003e) {\n        // Do something.\n    }\n}\n```\n\nThis would've been reported in Kotlin as:\n\n\u003e ⚠️ Cannot check for instance of erased type: MyClass\\\u003cString\\\u003e\n\n### Implicit interfaces \u0026 Mixins\n\nIn Dart, any class can be implemented as an interface. In Kotlin, you either have an interface or a class.\n\nSince you can use any Dart library in Dotlin, you can also implement any Dart class as an\ninterface or mixin, just like in Dart. The syntax for that is as follows:\n\n```kotlin\nclass MyClass : TheirDartClass(Interface), AnotherDartClass(Interface)\n```\n\nThis will compile to (leaving out irrelevant code for example's sake):\n\n```dart\nclass MyClass implements TheirDartClass, AnotherDartClass {}\n```\n\nEven though `TheirDartClass` is a `class` in Dotlin (not an `interface`) you can implement\nit as an interface. When you implement a Dart class like this, it's implemented\nas a pure interface (like in Dart), meaning you have to implement the whole interface yourself.\n\nThe same can be done for mixins:\n\n```kotlin\nclass MyClass : TheirDartClass(Mixin)\n```\n\n```dart\nclass MyClass with TheirDartClass {}\n```\n\nThis only works if `TheirDartClass` can be used as a mixin, meaing it either is declared with the `mixin` keyword, or\nhas no constructors and extends `Object` (`Any`). If a Dart class is not a valid mixin, the\nspecial mixin inheritance syntax is not available.\n\nIf you want to _extend_ a Dart class, regular Kotlin syntax can be used.\n\nThe implicit interface/mixin syntax is only necessary for Dart libraries that don't have handwritten\nDotlin declarations for them. If there are Dotlin declarations, regular Kotlin `class`/`interface` rules apply.\n\n### Const\n\nKotlin has a very strict concept of `const`. Only a few primitives can be declared `const`, and only as\ntop-level values or properties on `object`s. In Dart, on the other hand, it's possible to have `const` constructors\nfor classes and collection literals, and have local `const` variables.\n\nTo facilitate this, `const` is also more lenient and Dart-like in Dotlin. This means that the following Dotlin code:\n\n```kotlin\nclass MyClass const constructor(private val message: String)\n\nconst val myFirstClass = MyClass(\"First\")\n\nfun main() {\n    const val mySecondClass = MyClass(\"Second\")\n}\n```\n\nCompiles to:\n\n```dart\nclass MyClass {\n  const MyClass(this._message);\n  final String _message;\n}\n\nconst MyClass myFirstClass = MyClass('First');\n\nvoid main() {\n  const MyClass mySecondClass = MyClass('Second');\n}\n```\n\nYou can use all Dart `const` features in Dotlin.\n\nIf you want to explicitly invoke a `const` constructor, you can use the following syntax:\n```kotlin\n@const MyClass(\"Something\")\n```\n\nNote the `@` before `const`. This is because `@const` is an annotation, not a keyword.\nThe Kotlin compiler does not support keywords in front of expressions at the parser level.\n\nThe difference is easy to remember: with any _declaration_ you must use `const`, and with any\n_invocation_ you must use `@const`.\n\nNote that as in Dart, `@const` is not necessary when it's implied, e.g. by assigning to a `const val`.\n\n### Lateinit\n\nIn Kotlin, `lateinit` is not applicable to properties with types that are primitive or nullable/have a nullable upper bound. In Dotlin, this is possible.\n\nFor example, the following code, which would fail in Kotlin, works in Dotlin:\n\n```kotlin\nclass Example\u003cT\u003e {\n    lateinit var myNullableVar: String?\n\n    lateinit var myPrimitiveVar: Int\n\n    lateinit var myGenericVar: T\n}\n```\n\nRespectively, these declarations would've been reported in Kotlin with the following errors:\n\n\u003e ⚠️ 'lateinit' modifier is not allowed on properties of nullable types\n\n\u003e ⚠️ 'lateinit' modifier is not allowed on properties of primitive types\n\n\u003e ⚠️ 'lateinit' modifier is not allowed on properties of a type with nullable upper bound\n\nBut with Dotlin, this compiles to:\n\n```dart\nclass Example\u003cT\u003e {\n  late String? myNullableVar;\n\n  late int myPrimitiveVar;\n\n  late T myGenericVar;\n}\n```\n\n#### Lateinit `isInitialized` outside class\n\nIn Kotlin, `lateinit var`s cannot be checked whether they're initialized from outside the containing class. For example, the following code:\n```kotlin\nclass Example {\n    lateinit var lateVar: String\n}\n\nfun main() {\n    if (Example()::lateVar.isInitialized) {\n        // Do something.\n    }\n}\n```\n\nThe call would've been reported as:\n\n\u003e ⚠️ Backing field of 'var lateVar: String' is not accessible at this point\n\nHowever, in Dotlin, this compiles with no issues.\n\n### Primitives\n\nKotlin primitives that are not used in Dart and would only complicate code have been removed, meaning that\n`Byte`, `Short`, `Long`, `Float`, and `Char` are not present. This is because Dotlin has the following\nmapping of built-ins:\n\n| Dart     | Kotlin    |\n| -------- | --------- |\n| `int`    | `Int`     |\n| `double` | `Double`  |\n| `String` | `String`  |\n| `bool`   | `Boolean` |\n| `Object` | `Any`     |\n| `Never`  | `Nothing` |\n\nThis also means that `Int` now refers to a 64-bit integer, instead of 32-bit as in Kotlin.\n\n### Iterator\n\nIn Kotlin, any class that implements `hasNext()` and `next()` is considered an iterator. In Dotlin,\nthis is not the case. Instead, it's more like Dart: A class is only an considered an iterator if it\nimplements `dart.core.Iterator`. This means that the Dart `Iterator` API is used: instead of\n`hasNext()` and `next()`, `moveNext()` and `current` are used.\n\n\n`kotlin.collections.Iterator` is not available. However, the `kotlin.collections.Iterator`\nsubtypes are, changed to fit `dart.core.Iterator`: `MutableIterator`, `BidirectionalIterator`,\n`ListIterator`, and `MutableListIterator`.\n\n### Errors \u0026 Exceptions\n\nIn Kotlin, you can only throw `Throwable` or its subtypes. In Dotlin, this\nrestriction is removed. As in Dart, you can throw anything except `null`.\n\n```kotlin\nthrow \"This works!\"\n```\n\nTo integrate better with the Dart runtime, and because Dart has better\n[error](https://api.dart.dev/dart-core/Error-class.html)/[exception](https://api.dart.dev/dart-core/Exception-class.html)\ndefintions, they are used instead of the JVM exception classes. This also means `Throwable` is not available, since it doesn't\nserve any use anymore.\n\n### Annotations\n\nIn Kotlin, only `annotation class`es can be used as annotations. In Dart, classes with at least one `const` constructor\nor `const` top-level values can be used as annotations.\n\nTo facilitate, the same is possible in Dotlin. Classes and properties that can be used as annotation, have synthetic \n`annotation class` counter-parts generated in an `annotations` package, which can be used as annotations. \n\nFor example, if you have a Dart class in `lib/markers.dart` such as:\n\n```dart\nclass Fragile {\n    const Fragile();\n}\n```\n\nIt can be used in Dotlin like so:\n```kotlin\nimport my.package.markers.annotations.Fragile\n\n@Fragile\nclass Box\n```\n\nNormally, the `Fragile` class would be imported through `my.package.markers.Fragile`, but the annotation is in a special `annotations` sub-package.\nNote that if you want to use `Fragile` in a non-annotation context, you can stil use it as normal through `my.package.markers.Fragile`.\n\n### Importing\n\nIn Kotlin, declarations are imported through their FQN (fully-qualified name), while in Dart they're imported\nthrough URIs. In Dotlin, FQNs are generated based on a few factors.\n\nFor example, if you have a package named `species` [published](https://dart.dev/tools/pub/verified-publishers) by `example.com`,\nwhich has a file `lib/mammals.dart` where the class `Human` is declared, you can import `Human` as follows in Dotlin:\n```kotlin\nimport com.example.species.mammals.Human\n```\n\nA lot of packages follow the convention of exporting their published API in a file with the same name of their package in `lib/`. For example,\nyou'd import `package:species/species.dart` and use `Human` from there, because it's `export`ed (or declared) in `species.dart`.\n\nTo import a package-level import, Dotlin removes the need of specifying the package name twice, thus you'd import it like so:\n```kotlin\nimport com.example.species.Human\n```\n\nIf a package does not have a verified publisher, the package host is used as a fallback (in most cases `pub.dev`):\n```kotlin\nimport dev.pub.species.Human\n```\n\nIf a package does not have a host (e.g. it's local or from git), it's prefixed with `pkg`:\n```kotlin\nimport pkg.species.Human\n```\n\nIn the future, you'll also be able to provide a `groupId` per dependency in `pubspec.yaml`, also for your own package.\n\n## Differences from Dart\n\nAside from the obvious differences between the Kotlin language and stdlib, Dotlin adds\nsome Dart-specific enhancements. Also some other additions, because of differences between the Dart and Kotlin languages.\n\n### Const lambdas\n\nIn Dart, you cannot pass lambda literals (function expressions) as\narguments to const constructors, only references\nto top-level or static named functions.\n\nIn Dart, the following code:\n\n```dart\nclass Hobbit {\n  const Hobbit(this._computeName);\n  final String Function() _computeName;\n}\n\nvoid main() {\n  const bilbo = Hobbit(() =\u003e \"Bilbo Baggins\");\n}\n```\n\nWould throw the following error, because of the lambda literal argument:\n\n\u003e ⚠️ Arguments of a constant creation must be constant expressions.\n\nEven though if you passed a reference of a _named_ top-level/static function\nwith the exact same body, it would work.\n\nDotlin does this for you, so the following code compiles:\n\n```kotlin\nclass Hobbit const constructor(private val computeName: () -\u003e String)\n\nfun main() {\n    const val bilbo = Hobbit { \"Bilbo Baggins\" }\n}\n```\n\nAnd results in:\n```dart\nclass Hobbit {\n  const Hobbit(this._computeName);\n  final String Function() _computeName;\n}\n\nvoid main() {\n  const Hobbit bilbo = Hobbit(_$11f4);\n}\n\nString _$11f4() {\n  return 'Bilbo Baggins';\n}\n```\n\nAs you can see, a named function is generated based on the lambda, and passed to the\n`const` constructor.\n\nThis is only possible if the lambda does not capture local or class closure values. You _can_\nuse top-level/global values, however.\n\n### `const inline`\n\nIn Dotlin, you can create `const inline` functions, which can be used similarly to `const` constructors.\n\nThese functions must have a single return with a valid `const` expression, and otherwise only contain `const` variables.\n\nAn example:\n\n```kotlin\nclass Hobbit const constructor(name: String, age: Int, isCurrentRingbearer: Boolean)\n\nconst inline fun bilboBaggings(): Hobbit {\n  const val fullName = \"Bilbo Baggings\"\n\n  return Hobbit(fullName, age = 111, isCurrentRingbearer = false)\n}\n\nfun main() {\n  const val bilbo = bilboBaggings()\n}\n```\n\nThe `bilboBaggings()` call is inlined, meaning the called constructor\nis still `const`:\n\n```dart\n@pragma('vm:always-consider-inlining')\nHobbit bilboBaggings() {\n  const String fullName = 'Bilbo Baggings';\n  return Hobbit(fullName, 111, false);\n}\n\nvoid main() {\n  const Hobbit bilbo = Hobbit('Bilbo Baggings', 111, false);\n}\n```\n\nYou can also use arguments in `const inline` functions:\n\n```kotlin\nclass Hobbit const constructor(name: String, age: Int, isCurrentRingbearer: Boolean)\n\nconst inline fun baggings(firstName: String, age: Int): Hobbit {\n  const val fullName = \"$firstName Baggings\"\n  const val hasRing = firstName == \"Frodo\"\n\n  return Hobbit(fullName, age, isCurrentRingbearer = hasRing)\n}\n\nfun main() {\n  const val frodo = baggings(\"Frodo\", age = 33)\n}\n```\n\nNote that if you use arguments in `const` variables, they will be made\nnon-const. This is because `const inline` functions can still be called\nas non-const. However, if called as `const`, arguments are also `const`\ninlined:\n\n```dart\n@pragma('vm:always-consider-inlining')\nHobbit baggings(String firstName, int age) {\n  final String fullName = '${firstName} Baggings';\n  final bool hasRing = firstName == 'Frodo';\n  return Hobbit(fullName, age, hasRing);\n}\n\nvoid main() {\n  const Hobbit frodo = Hobbit('Frodo Baggings', 33, 'Frodo' == 'Frodo');\n}\n```\n\n### Type literals\n\nKotlin does not have type literals like Dart does. To accomodate for this, Dotlin\nhas a `typeOf` function, which compiles to a Dart type literal. For example, the following statement:\n```kotlin\nval myType = typeOf\u003cString\u003e()\n```\n\nCompiles to:\n\n```dart\nfinal myType = String;\n```\n\n### Collections\n\nExisting Dart collections have been dissected into different interfaces\nbased on their mutability, just like in Kotlin.\n\nHowever, `List` has been split into more interfaces, to represent all `List`\nkinds that exist in Dart runtime using types.\n\n#### `Iterable`\n\nDotlin's `Iterable` is mapped directly to Dart's `Iterable`. This means that unlike in Kotlin,\n`Iterable`s are _lazy_.\n\nThe `Iterable` class is significantly larger because Dart's `Iterable` contains a\nlot of methods. However, they've been renamed to match Kotlin conventions, some examples:\n\n| Dart        | Kotlin             |\n| ----------- | ------------------ |\n| `where`     | `filter`           |\n| `whereType` | `filterIsInstance` |\n| `expand`    | `flatMap`          |\n| `every`     | `all`              |\n| `skip`      | `drop`             |\n\n#### `Collection` \u003csup\u003e`is Iterable`\u003c/sup\u003e\n\nRepresents any type of collection of elements. It provides a common interface for\n`List` and `Set, which in Dart don't have a common interface.\n\n\u003e **Note**  \n\u003e Runtime type checks work: `List`s and `Set`s are considered `Collection`s at runtime.\n\n##### `MutableCollection` \u003csup\u003e`is Collection`\u003c/sup\u003e\n\nRepresents any kind of mutable collection of elements. \"Mutable\" specifically means\n_growable_ in Dart terms, meaning elements can be added and removed.\n\n\u003e **Note**  \n\u003e Runtime type checks work: Dart `List`s and `Set`s are considered `MutableCollection`s,\n_only if_ they are actually mutable. Examples (Dart):\n\u003e\n\u003e ```dart\n\u003e [1, 2, 3] is MutableCollection\u003cint\u003e == true\n\u003e ```\n\u003e ```dart\n\u003e List.unmodifiable([1, 2, 3]) is MutableCollection\u003cint\u003e == false\n\u003e ```\n\u003e \u003csup\u003eThese type checks don't work as Dart code as-is, but are compiled specially when writing a similar expression in Dotlin.\u003c/sup\u003e\n\n#### `List` \u003csup\u003e`is Collection`\u003c/sup\u003e\n\n\u003csup\u003eDart: `List`\u003c/sup\u003e\n\nA read-only interface that represents any kind of Dart's `List`s. Mutating methods can be\naccessed through subtypes.\n\n##### `ImmutableList` \u003csup\u003e`is List`\u003c/sup\u003e\n\n\u003csup\u003eDart: `List.unmodifiable`, `const [..]`\u003c/sup\u003e\n\nAn immutable list. Same interface as `List`, but guaranteed to be immutable.\n\n\u003e **Note**  \n\u003e Runtime type checks work: Dart `List`s are considered `ImmutableList`s,\n_only if_ they are actually immutable. Examples (Dart):\n\u003e\n\u003e ```dart\n\u003e const [1, 2, 3] is ImmutableList\u003cint\u003e == true\n\u003e ```\n\u003e ```dart\n\u003e List.unmodifiable([1, 2, 3]) is ImmutableList\u003cint\u003e == true\n\u003e ```\n\u003e ```dart\n\u003e [1, 2, 3] is ImmutableList\u003cint\u003e == false\n\u003e ```\n\n##### `WriteableList` \u003csup\u003e`is List`\u003c/sup\u003e\n\n\u003csup\u003eDart: `List` (`growable: true|false`)\u003c/sup\u003e\n\nAn interface that supports changing elements (`list[0] = \"abc\"`), but not adding or removing elements. This\ninterface represents both `FixedSizeList`s and `MutableList`s, since they are both writeable.\n\n\u003e **Note**  \n\u003e Runtime type checks work: Dart `List`s are considered `WriteableList`s,\n_only if_ they are actually writeable. Examples (Dart):\n\u003e\n\u003e ```dart\n\u003e [1, 2, 3] is WriteableList\u003cint\u003e == true\n\u003e ```\n\u003e ```dart\n\u003e List.of([1, 2, 3], growable: false) is WriteableList\u003cint\u003e == true\n\u003e ```\n\u003e ```dart\n\u003e List.unmodifiable([1, 2, 3]) is WriteableList\u003cint\u003e == false\n\u003e ```\n\n##### `FixedSizeList` (`Array`) \u003csup\u003e`is WriteableList`\u003c/sup\u003e\n\n\u003csup\u003eDart: `List` (`growable: false`)\u003c/sup\u003e\n\nAn interface that represents writeable fixed-length Dart `List`s, also known as _arrays_. Elements can\nbe changed (`array[0] = \"abc\"`), but not be added or removed. Any other operation that would change\nthe size of the list is also not possible.\n\nThe difference between this interface and `WriteableList` is that `WriteableList` represents\nany list whose elements can be changed, which also includes `MutableList`s.\n\n\u003e **Note**  \n\u003e Runtime type checks work: Dart `List`s are considered `FixedSizeList`s,\n_only if_ they are actually writeable. Examples (Dart):\n\u003e\n\u003e ```dart\n\u003e List.of([1, 2, 3], growable: false) is FixedSizeList\u003cint\u003e == true\n\u003e ```\n\u003e ```dart\n\u003e [1, 2, 3] is FixedSizeList\u003cint\u003e == false\n\u003e ```\n\u003e ```dart\n\u003e List.unmodifiable([1, 2, 3]) is FixedSizeList\u003cint\u003e == false\n\u003e ```\n\n##### `MutableList` \u003csup\u003e`is WriteableList, MutableCollection`\u003c/sup\u003e\n\n\u003csup\u003eDart: `List` (`growable: true`)\u003c/sup\u003e\n\nAn interface that represents growable Dart `List`s. Elements can be changed, added and removed.\n\n\u003e **Note**  \n\u003e Runtime type checks work: Dart `List`s are considered `MutableList`s,\n_only if_ they are actually mutable (writeable \u0026 growable). Examples (Dart):\n\u003e\n\u003e ```dart\n\u003e [1, 2, 3] is MutableList\u003cint\u003e == true\n\u003e ```\n\u003e ```dart\n\u003e List.of([1, 2, 3], growable: false) is MutableList\u003cint\u003e == false\n\u003e ```\n\u003e ```dart\n\u003e List.unmodifiable([1, 2, 3]) is MutableList\u003cint\u003e == false\n\u003e ```\n\n#### `Set` \u003csup\u003e`is Collection`\u003c/sup\u003e\n\n\u003csup\u003eDart: `Set`\u003c/sup\u003e\n\nA read-only interface that represents any kind of Dart's `Set`s. Mutating methods can be\naccessed through `MutableSet`.\n\n##### `ImmutablSet` \u003csup\u003e`is Set`\u003c/sup\u003e\n\n\u003csup\u003eDart: `Set.unmodifiable`, `const {..}`\u003c/sup\u003e\n\nAn immutable set. Same interface as `Set`, but guaranteed to be immutable.\n\n\u003e **Note**  \n\u003e Runtime type checks work: Dart `Set`s are considered `ImmutableSet`s,\n_only if_ they are actually immutable. Examples (Dart):\n\u003e\n\u003e ```dart\n\u003e const {1, 2, 3} is ImmutableSet\u003cint\u003e == true\n\u003e ```\n\u003e ```dart\n\u003e Set.unmodifiable({1, 2, 3}) is ImmutableSet\u003cint\u003e == true\n\u003e ```\n\u003e ```dart\n\u003e {1, 2, 3} is ImmutableSet\u003cint\u003e == false\n\u003e ```\n\n##### `MutableSet` \u003csup\u003e`is Set, MutableCollection`\u003c/sup\u003e\n\n\u003csup\u003eDart: `Set` (`{..}`)\u003c/sup\u003e\n\nAn interface that represents growable Dart `Set`s. Elements can be changed, added and removed.\n\n\u003e **Note**  \n\u003e Runtime type checks work: Dart `Set`s are considered `MutableSet`s,\n_only if_ they are actually mutable. Examples (Dart):\n\u003e\n\u003e ```dart\n\u003e {1, 2, 3} is MutableSet\u003cint\u003e == true\n\u003e ```\n\u003e ```dart\n\u003e Set.unmodifiable({1, 2, 3}) is MutableSet\u003cint\u003e == false\n\u003e ```\n\n## Usage\n\nDotlin, at this point in time, should not be used for any production projects. If you want to try\nit out, clone the repo and you can then build it with\n```sh\n./gradlew build distZip\n```\nThen you can find Dotlin in `build/distributions/dotlin-\u003cversion\u003e.zip`.\n\nIn there, there's a `bin/dotlin` executable you can try out.\n\n## Contributing\n\nSince the project is at an early stage, a lot is still changing and therefore — **for now** — code contributions\nare not encouraged. However, in the future when Dotlin is in a more stable state, this will definitely change.\n\nWhen code contributions are encouraged, you are required to sign off all of your commits:\n```\nMy commit message\n\nSigned-off-by: Jan Jansen \u003cjan@jansen.dev\u003e\n```\n\nBy contributing and signing off your commits, you agree to the Developer Certificate of Origin (DCO), which you can\n[read here](https://developercertificate.org/).\n\nFor now however, it is encouraged to try Dotlin out, and if you notice anything odd, or want to request a feature/improvement, to create\nan issue.\n\n## License\n\nDotlin itself is licensed under the [AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html).\n\nNote that this does not apply to code generated by Dotlin. Code generated by Dotlin can be used in projects of any license.\n\nAll libraries used by consumers (e.g. the Kotlin standard library implementation, the Dart core Kotlin definitions) are\nlicensed under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).\n\nThe Dotlin logo (`docs/assets/dotlin.png`) is licensed under [CC BY-NC-ND 4.0](https://creativecommons.org/licenses/by-nc-nd/4.0/).\n\n## Disclaimer\n\nDotlin is not associated with JetBrains or the Kotlin Foundation.\n","funding_links":["https://github.com/sponsors/wilkomanger"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotlin-org%2Fdotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotlin-org%2Fdotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotlin-org%2Fdotlin/lists"}