TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Kotlin is like TypeScript

32 pointsby yoshiokatsuneoabout 8 years ago

12 comments

COilabout 8 years ago
I think we get it, every languages are like Kotlin!
评论 #14373979 未加载
realharoabout 8 years ago
TypeScript has structural typing, that is a HUGE difference.
评论 #14374028 未加载
评论 #14373889 未加载
atemerevabout 8 years ago
"Happy languages are all alike; every unhappy language is unhappy in its own way".
realharoabout 8 years ago
<p><pre><code> name: string; constructor(name: string) { this.name = name } </code></pre> You don&#x27;t have to do this in TypeScript either, you can just do<p><pre><code> constructor(public name: string) { } </code></pre> Also, the &quot;Empty collections&quot; section doesn&#x27;t do the same thing, the collections you created in Kotlin are immutable.<p>And the TypeScript ones have the value `undefined` (unfortunate that strictNullChecks doesn&#x27;t catch things like that <a href="https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;TypeScript&#x2F;issues&#x2F;8476" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;TypeScript&#x2F;issues&#x2F;8476</a>).<p>And for some nitpicking, please be consistent with your semicolons, either use them or don&#x27;t use them, but don&#x27;t mix it randomly like that.
评论 #14374097 未加载
janwillembabout 8 years ago
Why this comparison?
评论 #14373925 未加载
yoshiokatsuneoabout 8 years ago
derived from Swift is like Kotlin: <a href="https:&#x2F;&#x2F;github.com&#x2F;Nilhcem&#x2F;swift-is-like-kotlin" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Nilhcem&#x2F;swift-is-like-kotlin</a>
评论 #14373900 未加载
评论 #14374079 未加载
dtechabout 8 years ago
This is getting ridiculous
评论 #14374100 未加载
ccozanabout 8 years ago
Is this Kotlin the new &quot;Erlang&quot; of the HN&#x27; first page?
mhdabout 8 years ago
I wonder what&#x27;s the oldest and&#x2F;or most maligned language that you can use to make a similar comparison that&#x27;s still somewhat valid...
ptxabout 8 years ago
&quot;for index in 1–5&quot; is like &quot;for let index of underscore dot range 1–6&quot; in the same way Lisp is like COBOL.
codesternewsabout 8 years ago
Kotlin is like Swift<p>Kotlin is like TypeScript<p>that infer<p>TypeScript is like Swift<p>am I getting right? or Is there anything else?
评论 #14374152 未加载
评论 #14374154 未加载
boubiyeahabout 8 years ago
Kotlin is also like Kotlin
评论 #14374182 未加载