You may have already heard many good things about C#, but it turns out that VB is slightly more expressive and elegant than C# (I say this as someone that loves C#, and primarily programs using it along with F#).
Here is what VB offers:
* A syntax that almost looks like pseudo code
* A static type system with a kind of optional typing
* Object-oriented programming (classes, inheritance, ad-hoc polymorphism, etc.)
* Functional programming (closures, lambda expressions, parametric polymorphism (generics), etc.)
* Monad Comprehensions (LINQ)
* Type classes/traits (in the form of implicit conversions to an abstract class -- this is another kind of ad-hoc polymorphism, and something that not even F# can easily do)
* XML Literals
* Support for multicore programming in the form of syntactic sugar for writing asynchronous code in a familiar synchronous style (the `async` and `await` keywords)
* All of the .NET framework
* The Roslyn compiler infrastructure -- instead of the compiler being a black box, you can hook into the compiler pipeline
* It runs everywhere Mono runs.
Here's an example of me using it to make multithreaded NIO calls with XMPP:
val conn = Connection.create(getConnParams("username", "password"))
val result =
for {
(conn, myjid) <- ConnectionHelper.gchatConnect(conn, "xmppzExampleClient")
(conn, presence) <- conn.sendGet[Presence](Presence(from=Some(myjid), to=Some(tojid), presenceType=Some("probe")))
conn <- conn.send(Message(body=Some(msgtext), to=tojid, from=Some(myjid)))
conn <- conn.send(StreamEnd())
} yield conn
Each <- is actually an NIO callback that uses a threadpool (so you aren't spawning too many threads).But you don't get the nested craziness of ugly callbacks like you would in python or javascript (for instance).
Edit: If you really want whitespace, maybe F#?
N.B. I am using Rich Hickey’s definition of “simple” from his excellent talk “Simple Made Easy”.
func factorial(x int) (result int) { if x == 0 { result = 1; } else { result = x * factorial(x - 1); } return; }
Only on HN would such a discovery be made of such a language.
The others that mention: Go, Nim, Crystal - all have valid bases to say it is "similar", but Python is Python and none of those 3 quite read like this one.
Interesting language though and it seems the author is active (with an edit in June 2015).
"In computer science, an invariant is a condition that can be relied upon to be true during execution of a program, or during some portion of it. It is a logical assertion that is held to always be true during a certain phase of execution. For example, a loop invariant is a condition that is true at the beginning and end of every execution of a loop."
I didn't mean it in any more specialized sense, except that there will always exist some invariants that can't be statically enforced (Halting problem). That said, there are lots of things that types can enforce - that's what types are good for (and they are spectacularly good things).