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.

Short tutorial on Haskell for C programmers

27 pointsby socrateesover 16 years ago

3 comments

vladover 16 years ago
Two things that are never mentioned that show how a language like Visual Basic 6 or VB.NET (which I believe are still taught in high school or college programming courses) is just backwards for learning computer science. First, at least in Visual Basic 6, functions didn't return values like in any other language I know of; instead, the function name was set to a value, like a variable. This alone would not kick you out of the function. You had to remember to type Exit Function, unless you were at the end of the function definition already.<p>Secondly, visual basic 6 (and .NET) evaluate the entire expression, even when it is obvious it cannot be true, which causes all sorts of issues to popup if the developer is used to C and similar languages that support short circuit operations, as described at the end of this article. For example, you could not rewrite the c statement if (n != null &#38;&#38; n % 2 == 0) in visual basic 6 without using two nested if statements. The overall product benefitted from Microsoft's backing and ability to easily use any of Microsoft's controls, which allowed for fast development. But the language features themselves were atrocious. VB.NET introduced two keywords, AndAlso and OrElse, that do support short-circuit binary operators, which I only learned about from googling just now. The language is a pile of dung and nobody should be introduced to it any more.
评论 #415199 未加载
评论 #415104 未加载
habiburover 16 years ago
&#62; First, at least in Visual Basic 6, functions didn't return values like in any other language<p>Seems that Microsoft realized this problem and fixed it in VB.NET. You can type "return result" from anywhere and it will work as like C.
albertcardonaover 16 years ago
Basically a nice hold-my-hand introduction to functional programming for imperative programmers.