Scala! It's mutli paradigm, it can be very simple to read, has amazing concurrency support and can utilize all the NIO goodies from the JVM. 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) Each But you don't get the nested craziness of ugly callbacks like you would in python or javascript (…
Maybe C# or the next release of TypeScript? You'd have asynchronous / await so async IO looks more like regular code than generators. Like Scala though there's still a lot of unnecessary syntax. AFAICT the answer to the parents question is 'No, but this would be good'
Ask HN: Does such a programming language exist?
21–30 of 37 posts
Re: Ask HN: Does such a programming language exist?
#22func factorial(x int) (result int) { if x == 0 { result = 1; } else { result = x * factorial(x - 1); } return; }
Re: Ask HN: Does such a programming language exist?
#23Scala! It's mutli paradigm, it can be very simple to read, has amazing concurrency support and can utilize all the NIO goodies from the JVM. 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) Each But you don't get the nested craziness of ugly callbacks like you would in python or javascript (…
Re: Ask HN: Does such a programming language exist?
#24Statically typed and simple generally means it's pretty hard to actually write reusable code and it's unlikely to "support multi-paradigm" very well. That said, "simple like Python" is an interesting phrase...
Why does static typing make it harder to write reusable code?
Re: Ask HN: Does such a programming language exist?
#25You 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.
Re: Ask HN: Does such a programming language exist?
#26Re: Ask HN: Does such a programming language exist?
#27Re: Ask HN: Does such a programming language exist?
#28Re: Ask HN: Does such a programming language exist?
#29Earlier quoted context omitted.
Why does static typing make it harder to write reusable code?
A simple type system makes it difficult to express useful invariants that are also flexible enough for the code to be reusable. Static typing makes it easier to write reusable code, provided the type language is sufficiently expressive.