4 ms·
As much as I love C++, it's getting a bit too hairy for my taste. Instead of making things more simple, it's just getting more complex. I'd love a statically t
by bensummers 17y ago
As much as I love C++, it's getting a bit too hairy for my taste. Instead of making things more simple, it's just getting more complex.
I'd love a statically typed Ruby, for example. Duby looks interesting, but a bit young and incomplete to use.
- lonestar 17y agoHave you played with Scala? It reminds me in some ways of Ruby, you might find it to your liking.
- samstokes 17y agoI've also found Scala has a similar feel to Ruby, which is a bit surprising given Scala's static type system and Ruby's extreme dynamicness. Here are a few similarities: * concise syntax (Ruby via dynamic typing, Scala via type inference) * hybrid OO-functional (Ruby isn't normally described this way, but it has a lot of functional idioms built in, and unlike in Python, they're often considered good style) * dogmatic wrt the OO part (i.e. every value is an object, unlike Java or C++) * TIMTOWTDI (should my Scala higher-order function take a function or a lazy value?) * DSL fetishism * very flexible and adaptable syntax, which (for both languages) is a two-edged sword - esp. things like Ruby's optional method invocation, and Scala's optional dot * both allow adding methods to existing classes (Scala fakes this via implicit conversions, but I believe it's idiomatic)
- bensummers 17y agoI've had a look at Scala, but not so much as to actually start writing code. But it does look promising. http://macstrac.blogspot.com/2009/04/scala-as-long-term-replacement-for.html http://macstrac.blogspot.com/2009/04/scala-as-long-term-repl... The thing which appeals about Duby is that it uses the underlying Java typesystem, and doesn't have a runtime library. If it ever gets finished, it can be as fast as any Java code, and there's been a lot of effort put into making Java code fast.
- fauigerzigerk 17y agoDon't you think the initializers make things simpler?
- bensummers 17y agoI've never really had a problem with initializers in C++. I suppose it comes down to programming style, and I try to avoid complex initialisations by using nice simple classes with only one constructor.