# Kotlin is a small language

**URL:** <https://discuss.kotlinlang.org/t/kotlin-is-a-small-language/792>\
**Category:** Uncategorized\
**Created:** [June 8, 2013, 4:28pm UTC](https://discuss.kotlinlang.org/t/kotlin-is-a-small-language/792 "2013-06-08T16:28:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dodyg](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/dodyg/32/1451_2.png) [@dodyg](https://discuss.kotlinlang.org/u/dodyg)\
**Post date:** [June 8, 2013, 4:28pm UTC](https://discuss.kotlinlang.org/t/kotlin-is-a-small-language/792/1 "2013-06-08T16:28:47Z")

</div>

My adoption of Kotlin is purely as a language targeting the Android platform so I have very little experience developing with Java and the JVM (I am primarily a C# developer). I started writing a quick guide to Kotlin two weekends ago just to exercise my knowledge of the language and I am surprised to discover that I am using most of the language features on my daily Android development (including all the myriad features related to functions).

Features that I haven’t used in my projects are local class (defining a class inside a function), delegated class, and the brand new delegated properties.

---

<div class="post-metadata">

**Author:** ![dodyg](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/dodyg/32/1451_2.png) [@dodyg](https://discuss.kotlinlang.org/u/dodyg)\
**Post date:** [June 19, 2013, 5:53am UTC](https://discuss.kotlinlang.org/t/kotlin-is-a-small-language/792/2 "2013-06-19T05:53:27Z")

</div>

I actually realize that **local class** is a great way to hold throw away json values

```kotlin
import com.github.kevinsawicki.http.HttpRequest
import com.google.gson.Gson

public fun googleShorten(url: String): Result<String>
{
  class shortenData (public val longUrl: String)
  class shortenDataReply(public val kind: String, public val id: String, public longUrl: String)
  try
  {
  val gson = Gson()
  val payload = gson.toJson(shortenData(url))
  var pst = HttpRequest.post(“https://www.googleapis.com/urlshortener/v1/url”)
  pst?.contentType(“application/json”)
  pst?.send(payload)
  &nbsp;&nbsp;val code = pst?.code()

  &nbsp;&nbsp;if (code == 200){

           val reply = pst!!.body()!!
           val s = gson.fromJson(reply, javaClass<shortenDataReply>())!!
           return Result.right(s.id)
  }
  else{
           return Result.wrong<String>(null)
  }
  } catch(ex: Exception){
  return Result.wrong<String>(ex)
  }
}
```

---

<div class="post-metadata">

**Author:** ![bashor](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/bashor/32/1431_2.png) [@bashor](https://discuss.kotlinlang.org/u/bashor)\
**Post date:** [June 19, 2013, 9:43am UTC](https://discuss.kotlinlang.org/t/kotlin-is-a-small-language/792/3 "2013-06-19T09:43:01Z")

</div>

I think you can omit public in local classes.
