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.

Language Design in the Real World

77 pointsby yeputonsalmost 3 years ago

2 comments

karmakazealmost 3 years ago
Ceylon and Kotlin both came out in 2011 and neither was popular. I was hoping Ceylon would come out on top as giving the most without incurring the complexity of Scala (which can co-exist for other uses&#x2F;users).<p>From Ceylon Wikipedia[0]<p>&gt; Null safety<p>&gt; Union and intersection types are used to provide null safety. The top type of the Ceylon type hierarchy is the class Anything, which has two subclasses: Object, the superclass of all normal classes and all interfaces, and Null, with the only instance null. Since Object and Null are disjoint types, most regular types like Integer or List&lt;String&gt; are not nullable; a nullable type is the union Integer|Null, abbreviated Integer?.<p>So not only do we get null safety, we get both intersection and union types. The emphasis on immutability is also a great selling feature, but perhaps that limited its interoperability with Java collections and adoption.<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Ceylon_(programming_language)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Ceylon_(programming_language)</a>
评论 #31461908 未加载
Supermanchoalmost 3 years ago
&gt; Why has no one done this before Kotlin?<p>...in reference to nullable types being added<p>1. Languages generally release with this (ie Swift, PHP), rather than add it later<p>2. There is a risk that it won&#x27;t be accepted because of bad assumptions that can either be technical or social. ie This feature exists and is criticized in other languages like PHP<p>3. There is no proof that it&#x27;s any more important than any other feature being discussed.<p>4. There is work associated with doing it.<p>There ya go.
评论 #31459919 未加载
评论 #31463728 未加载
评论 #31459729 未加载
评论 #31460534 未加载