8 Mar 2021 |
webstrand (webstrand) | I've acutally used Dart a little bit. | 01:49:04 |
tcf909 (T.C. Ferguson) | seems simpler, no? | 01:49:20 |
tcf909 (T.C. Ferguson) | they typing side of things anyway | 01:49:56 |
tcf909 (T.C. Ferguson) | *the | 01:50:00 |
webstrand (webstrand) | yeah, it's definitely simpler on the typing side. Unlike Typescript it enforces most of its types at runtime | 01:50:22 |
webstrand (webstrand) | Dart is much closer to javascript, than it is to typescript and other languages that check types at compile time. | 01:52:29 |
tcf909 (T.C. Ferguson) | ya, maybe what I like about it | 01:52:46 |
webstrand (webstrand) | But even there, if you defineclass Foo {
int x;
} | 01:53:07 |
webstrand (webstrand) | * But even there, if you defineclass Foo {
int x;
} | 01:53:32 |
webstrand (webstrand) | if you use Foo in a type-context, you get an instance-type, not a class-type:class Bar {
Foo y;
} | 01:54:10 |
tcf909 (T.C. Ferguson) | ya, but I never seem to get caught up in any of the type things like I do with TS | 01:55:26 |
tcf909 (T.C. Ferguson) | a class is a class is a class | 01:55:38 |
tcf909 (T.C. Ferguson) | and typeof gets used at runtime | 01:55:58 |
tcf909 (T.C. Ferguson) | same as it does at compile | 01:56:02 |
tcf909 (T.C. Ferguson) | I wish dart had the same scale as js | 01:56:44 |
webstrand (webstrand) | I'm not that experienced with Dart, I don't think it has a typeof ? Only obj.runtimeType? | 01:56:49 |
tcf909 (T.C. Ferguson) | ya | 01:57:36 |
tcf909 (T.C. Ferguson) | maybe that is my issue | 01:57:45 |
tcf909 (T.C. Ferguson) | I’m using and thinking of typeof as instanceof (or the reverse) | 01:58:00 |
tcf909 (T.C. Ferguson) | I hear the family calling for dinner downstairs | 01:58:44 |
webstrand (webstrand) | yeah, there's another type InstanceType<T> which will take a constructor new (...args: any) => U and return just the U | 01:58:44 |
tcf909 (T.C. Ferguson) | I’ll catch you later webstrand | 01:59:04 |
tcf909 (T.C. Ferguson) | thanks again for your insight | 01:59:08 |
tcf909 (T.C. Ferguson) | I really appreciate the thoughts | 01:59:14 |
webstrand (webstrand) | good luck, I hope you make a breakthrough. | 01:59:20 |
webstrand (webstrand) | I learned Dart after learning typescript, I really prefer Typescript's type-system to Dart's. It's so much more expressive. | 02:00:04 |
fatcerberus (Bruce Pascoe) | It's easiest, I've found, to think of all the type-level stuff in TS as just you programming the type checker | 02:56:03 |
fatcerberus (Bruce Pascoe) | It's even turing complete | 02:56:07 |
fatcerberus (Bruce Pascoe) | So typeof foo is just whatever TS thinks the type of foo -the-identifier is, i.e. if you pass that identifier to a function, what is its type | 02:57:31 |
| 53K5HUN_8 joined the room. | 03:24:35 |