Comment

Comment by kodebach

No it doesn't, but it also doesn't need it. Whereas in Java you write:

  if (obj instanceof Point(double x, double y)) {
      foo(x,y)
  }
Kotlin with its smart cast feature lets you do

  if (obj is Point) {
    foo(obj.x, obj.y);
  }
parent kodebach 13 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton