Live data from Hacker News

Scala interview questions

pedrorijo.com

1–10 of 28 posts

Re: Scala interview questions

#4
post #3

Related: The levels of Scala knowledge, according to Martin Odersky[1] [1] http://www.scala-lang.org/old/node/8610

  > Level A2: Intermediate application programmer
  > [...]
  > - XML literals
nope nope nope nope

I'm sorry; I really want to like novel languages, strongly typed language, portable languages, and a bunch of other boxes that scala does check. But stuff like this... what?

This may be my most reddit-worthy comment in the history of Hacker News, but sometimes you see a spade, and you just have to call it a spade. Scala has the most utterly bizarre priorities.

Re: Scala interview questions

#5
post #3

Related: The levels of Scala knowledge, according to Martin Odersky[1] [1] http://www.scala-lang.org/old/node/8610

> Level A2: Intermediate application programmer > [...] > - XML literals nope nope nope nope I'm sorry; I really want to like novel languages, strongly typed language, portable languages, and a bunch of other boxes that scala does check. But stuff like this... what? This may be my most reddit-worthy comment in the history of Hacker News, but sometimes you see a spade, and you just have to call it a spade. Scala has t…

Is this bizarre, or do a lot of systems work with xml, like rendering HTML pages or reading a legacy api? Is this that different a feature than JSX in react? I am not a scala developer but this seems not out of place for a language that powers web servers.

Re: Scala interview questions

#6

Earlier quoted context omitted.

> Level A2: Intermediate application programmer > [...] > - XML literals nope nope nope nope I'm sorry; I really want to like novel languages, strongly typed language, portable languages, and a bunch of other boxes that scala does check. But stuff like this... what? This may be my most reddit-worthy comment in the history of Hacker News, but sometimes you see a spade, and you just have to call it a spade. Scala has t…

Is this bizarre, or do a lot of systems work with xml, like rendering HTML pages or reading a legacy api? Is this that different a feature than JSX in react? I am not a scala developer but this seems not out of place for a language that powers web servers.

A lot of systems work with a lot of things. The question is what belongs in the compiler and core language, and why it's taking up time in my compile step -- this latter question being particularly fair game in the Scala ecosystem, with its almost-legendarily slow compile times.

A tool to check that my XML is valid: great! Yes, please! Great; but that's not a language's job.

Write a tool for it and invoke it in another step in your build process. Call it a linter because that's what it is: a linter is a process that checks other documents for correctness.

Type inference for a language and XML grammar checking don't belong in the same process; they just don't. Only sadness and wasted (human, and machine alike) time can come of it.

Re: Scala interview questions

#7
post #3

Related: The levels of Scala knowledge, according to Martin Odersky[1] [1] http://www.scala-lang.org/old/node/8610

> Level A2: Intermediate application programmer > [...] > - XML literals nope nope nope nope I'm sorry; I really want to like novel languages, strongly typed language, portable languages, and a bunch of other boxes that scala does check. But stuff like this... what? This may be my most reddit-worthy comment in the history of Hacker News, but sometimes you see a spade, and you just have to call it a spade. Scala has t…

> Scala has the most utterly bizarre priorities.

This is from 2011, and in any case represents knowledge of Scala as it is, not Scala's priorities. In 2012, Odersky, discussing Scala's​ priorities going forward, pointed to XML literals as a language feature to ax for Scala 3, moving XML handling to libraries.

https://groups.google.com/forum/m/#!topic/scala-language/PV4...

Re: Scala interview questions

#8

Earlier quoted context omitted.

Is this bizarre, or do a lot of systems work with xml, like rendering HTML pages or reading a legacy api? Is this that different a feature than JSX in react? I am not a scala developer but this seems not out of place for a language that powers web servers.

A lot of systems work with a lot of things. The question is what belongs in the compiler and core language, and why it's taking up time in my compile step -- this latter question being particularly fair game in the Scala ecosystem, with its almost-legendarily slow compile times. A tool to check that my XML is valid: great! Yes, please! Great; but that's not a language's job. Write a tool for it and invoke it in anoth…

Compile times aren't really affected by the language/library distinction. Its not like the compiler is slower even if you don't use them. The compiler would be better without them, sure...but I see that as more of a potential bug surface area problem as opposed to compiler performance.

Re: Scala interview questions

#9
post #3

Related: The levels of Scala knowledge, according to Martin Odersky[1] [1] http://www.scala-lang.org/old/node/8610

> Level A2: Intermediate application programmer > [...] > - XML literals nope nope nope nope I'm sorry; I really want to like novel languages, strongly typed language, portable languages, and a bunch of other boxes that scala does check. But stuff like this... what? This may be my most reddit-worthy comment in the history of Hacker News, but sometimes you see a spade, and you just have to call it a spade. Scala has t…

XML literals are now deprecated.

Which is too bad, in my opinion, as HTML is mostly XML, too, and they are immensely useful for HTML templates in Scala.js environment (like React's JSX on steroids). Who'd have guessed.

I can only hope that thanks to the amazing work of Eugene Burmako, we'll have SQL literals, JSON literals, and whatever else, all properly typed, of course. Now _that_ would be something!

Re: Scala interview questions

#10
I think it is very telling about the state of interviews in the tech world when:

1. I can NOT off the cuff answer those all correctly (at least not without a little Googling).

2. I can, largely off the cuff, implement an IO monad in Scala using higher-kinded types and compose instances of them in a hand rolled non-blocking server.

Post reply on HN