5 ms·
One minor nitpick: "strongly typed" is not very meaningful. "statically typed" (or just "typed") conveys the intended meaning much better, since it has a clear
by Tade0 6y ago
One minor nitpick: "strongly typed" is not very meaningful. "statically typed" (or just "typed") conveys the intended meaning much better, since it has a clear definition.
Anyway adding proper support for TS sealed the deal for me - Svelte itself might never reach mainstream adoption but the idea of having a framework-compiler is something that I hope will, since it retains all the advantages of alternative approaches without introducing any significant disadvantages.
- malkarouri 6y agohttps://en.hexlet.io/courses/intro_to_programming/lessons/types/theory_unit https://en.hexlet.io/courses/intro_to_programming/lessons/ty...
- Tade0 6y agoFunny you should mention it, because that's just one of many definitions. Off the top of my head there's also "strong", as in "the type system is sound" or "not allowing pointer arithmetic". It's not that clear cut.
- lucideer 6y ago"Strongly typed" and "statically typed" are not synonymous. Yes, SvelteComponentTyped is statically typed, but that's somewhat implicit (and irrelevant) here. What they're referring to in that particular sentence is ease of strong typing. Static typing is a separate thing.
- vanderZwan 6y agoThat's true, but GP's point about how nobody really agrees on what "strongly typed" means still holds up. It might be worthwhile to frame it as "static and strongly¹ typed" with a footnote expanding on what "strongly" means to the svelte developers, just to get everyone to agree what we are even talking about in the first place.
- lucideer 6y agoI'm not sure I'd agree that nobody agrees on what "strongly typed" means (yes I understand that sounds like an oxymoron but bear with me). I think the confusion around the term mainly arises from people in computer science having a strong ;) preference for binary definitions. To be able to say "X is strongly typed" and "Y is not strongly typed" is desirable. However, linguistically, "strong" and "weak" are not binary terms. Static is: something is static or is not. But strength/weakness is an assessment on a scale. Defining something as "strong" is always, by definition, relative and somewhat subjective in nature. That isn't to say that the definition of "strongly typed" is subjective; we can find agreement on what scale "strong types" live upon. But the application of the term to any given object is subjective. We cannot say "X is strongly typed", we can only say "X is more/less/very/not very strongly typed".
- vanderZwan 6y ago> That isn't to say that the definition of "strongly typed" is subjective; we can find agreement on what scale "strong types" live upon. We cannot say "X is strongly typed", we can only say "X is more/less/very/not very strongly typed". I agree with your overall argument, but in this conclusion I subtly disagree: it implies that we could come up with some linear quantitative scale from 0 to 1 of how strongly typed something is. I don't think we can, it's a composite of qualitative features that defies that approach. It might even be a somewhat rock-paper-scissors like kind of thing where also we cannot really value each feature because their positive or negative value greatly depends on the presence or absence of other features.
- darksaints 6y agoStrongly typed is meaningful and has a real definition, but it is used incorrectly here. Strongly typed means that invalid runtime types result in invalid programs...which can actually be true for both static typed languages (like Rust or OCaml) and dynamic typed languages (like Python, which throws errors on invalid types). Typescript is statically typed but it is also weakly typed. Types are validated at compile time, but they do not prevent you from using invalid types at runtime.