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.

How Scala Changed My Programming Style

33 pointsby coglethorpeabout 16 years ago

5 comments

henningabout 16 years ago
A lot of the "OMG Scala &#60;3" stuff being written recently comes from people who have written Scala books and therefore kind of have an agenda.<p>The essential idea behind the post is this: using a language like Scala can make you use a mainstream language like C# or Java differently. By using a language that makes immutability the default it teaches you when mutable state is actually necessary and when it isn't. This will lead you to write code in whatever normal language that also has less mutable state, and fewer side effects. It will therefore be easier to test and have fewer bugs.<p>And, no, I have not written any Scala books and have no Scala-related products/services to sell you.
评论 #585502 未加载
lallysinghabout 16 years ago
I can't describe how happy I'll be when we have lambdas in C++. Them + the STL will be a very lightweight gateway drug into functional programming for a lot of programmers.
评论 #585521 未加载
jimbokunabout 16 years ago
That is a nice, concrete example of how functional style can improve code clarity.
richcollinsabout 16 years ago
1. "I enjoy the benefits of static typing such as types as documentation"<p>Documentation as a side effect of types is somehow better than a system designed for good documentation?<p>"code completion in IDE"<p>See 1<p>"execution speed"<p>See LuaJIT, Self, Javascript ... etc<p>The reasons people often give to justify losing (types) so much flexibility (late binding) never add up to me.
Hexstreamabout 16 years ago
I have no idea why anyone would use ++i (though technically correct) instead of i++ in a for loop's incrementation clause since the incrementation is done <i>after</i> the loop body, not before... That just seems like willfully confusing intuition.
评论 #585296 未加载
评论 #585434 未加载
评论 #585144 未加载
评论 #585300 未加载
评论 #585543 未加载