TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Confessions of a Ruby Developer Whose Heart was Stolen by Scala

43 点作者 YAFZ将近 12 年前

10 条评论

gizzlon将近 12 年前
They way you&#x27;d build large systems in dynamic languages is to break it up into many smaller pieces that work together. This frees you to change parts without worrying about the rest.<p>To me, this type of development is much more natural and sane than the &quot;one big clusterfuck&quot; type of projects I&#x27;ve seen in Java et.al.<p>Edit: Also, dynamic languages let you make the tradeof between safety and speed. Sometimes you go slow and steady (simple code, tests..) and sometimes you just want to test something out.
评论 #5873984 未加载
BonoboBoner将近 12 年前
Scala is a fantastic language, but my heart seems to resist due to things like this (slide 27&#x2F;42):<p><pre><code> implicit class RichSeq[A, C[A] &lt;: Seq[A]](underlying: C[A]{ def cycle: Iterator[A] = { lazy val circular: Stream[A] = underlying.toStream #::: circular circular.iterator } }</code></pre>
评论 #5872993 未加载
评论 #5873216 未加载
评论 #5873648 未加载
评论 #5873086 未加载
评论 #5873028 未加载
jitl将近 12 年前
As a Ruby developer, I can&#x27;t get through these sorts of slides. My other languages are C, Go and JavaScript, and the Scala syntax is totally inscrutable to me. Isn&#x27;t the point of slides presenting something that can be easily absorbed? And I can&#x27;t just quickly look up these declarations either — Scala is too complex for that given my experience level. Is there a gentle introduction talk for Scala around so I can evaluate the language without putting in a week of learning?
评论 #5872888 未加载
评论 #5872929 未加载
评论 #5872899 未加载
评论 #5873032 未加载
评论 #5873255 未加载
评论 #5872890 未加载
trailfox将近 12 年前
For those interested in learning Scala I&#x27;d recommend the free chapters from Scala for the Impatient:<p><a href="http:&#x2F;&#x2F;logic.cse.unt.edu&#x2F;tarau&#x2F;teaching&#x2F;SCALA_DOCS&#x2F;scala-for-the-impatient.pdf" rel="nofollow">http:&#x2F;&#x2F;logic.cse.unt.edu&#x2F;tarau&#x2F;teaching&#x2F;SCALA_DOCS&#x2F;scala-for...</a>
评论 #5873022 未加载
hejsna将近 12 年前
It seemed like most of his slides came down to the old typed&#x2F;untyped flame war. Yes, in Scala you can look at your objects in an IDE and be told what type they are, in Ruby you can&#x27;t. Some organizations and people need that, some don&#x27;t. And yes, it&#x27;s easier to optimize typed languages. Some applications need that extra speed, most don&#x27;t.<p>I&#x27;m happy he found a language he enjoys working with, but I doubt this will change anyone&#x27;s mind...
评论 #5873087 未加载
garysweaver将近 12 年前
Ruby and Scala are for two different kinds of environments. One is an environment where having less code to maintain (that can also be highly legible) matters and where you have a lot of options. The other is an environment where an edge in performance is more important, but not important enough to write it in an even faster language&#x2F;not run in the JVM at all.<p>I noticed a lack of a link to a 1:1 comparison of application code with realistic examples. I think such comparisons and related discussion are often the best way to convince someone to use a language.<p>And some slides were just blatantly wrong, like Mixin Abuse: apparently that is just a long list of module includes? I have never seen so many module includes in a single class in application code. But, assuming you did have that, you should show what it would look like side-by-side in Scala. In Ruby, there are a lot of options when it comes to including other code or defining code in a class, instance, etc. Those options can lead to much less and more legible code if used correctly.<p>I remember when people said Java was slow; they made it seem like it was a fad, and no reputable company would use it. And... we see where that went.
Stranger2013将近 12 年前
Well, of course a classic programming language is better then a script language for majority of tasks. Script languages like JS and Ruby just should not be abused and should only be used as a very thin layer on top. E.g. GUI scripting.
评论 #5873107 未加载
评论 #5872838 未加载
playing_colours将近 12 年前
The speaker pays a lot of attention to implicits in Scala. Well, it&#x27;s a powerful tool, elegant solutions can be built with it, but you should be careful using them. Implicits bring its own magic and abusing them can pollute your project, make it difficult to understand the code. Maybe the speaker is so attracted to inplicits because they remind him of Ruby&#x27;s &#x2F; Rails&#x27; magic?
评论 #5872914 未加载
sandGorgon将近 12 年前
Can someone comment on the current state of tooling in the Scala world. Last I had tried (some months back), SBT was extremely slow.<p>Googling about SBT came back with a lot of complaints about the state of scala tooling back then.
评论 #5873229 未加载
dgregd将近 12 年前
I just wonder when someone will build a tool to annotate Ruby, Python source code with var types gathered during run-time.<p>If C has Valgrind then dynamic typed languages should get something for the types.
评论 #5874532 未加载
评论 #5877486 未加载