#690 Please keep Fan clean & intuitive.

tcolar Sat 25 Jul 2009

One of the main things I like about Fan is it's clean and intuitive syntax. However some of the recent discussion made me wonder for how long it's gonna be that way.

One of the funny things with newer languages is that most of the people following it early are not necessarily representative of the software industry, what I mean by that it's that it's a lot of high end developers / researchers / professors and other language experts, who all want some cool features.

I'm all for syntactic sugar, but really I think what makes a language widely used in the industry, not just a few startups / pet projects, is an easy learning curve and stability.

If you look at Java, which you can't deny gained(and still has) a huge market share quickly, it surely wasn't for all the features, as a matter of fact it purposely removed many. If you ask me, it was because of a nice syntax, and very nice & simple API's(at the time), a stable JVM, and also a bit the cross-platform aspect.

I think another reason why Java is so widely used is that it's simplicity means it's easy to understand, hence less likely that a less knowledgeable developer will write bugs because of misunderstanding the language. At the end of the day I think that's what serious companies cares about.

Personally I think Scala has already crossed the learning-curve barrier and that it will prevent it's real widespread adoption (I could be wrong, time will tell).

Either way I hope Fan doesn't go there, we don't need things like this: http://this-statement-is-false.blogspot.com/2009/07/safe-navigaion-in-scala-take-2.html

Keep it clean & simple.

KevinKelley Sat 25 Jul 2009

+1++

I think we need now to be using what we got, as heavily as possible, to shake out the places where concepts collide, so current feature set can be tweaked if needed, while it's still possible to do that.

F'rinstance, the recent change from # to * for field accessors added another minor gotcha like this one:

class gotcha {
  Str s { get; set }

  new make(Str str) {
    a := [,]
    *s = str   // compiler sees this as 'mult'
  }
}

No big deal, won't happen often and a semicolon fixes it, but it's an example of how features can collide with each other.

We've got a lotta lotta features here, and it's still pretty nicely coherent, but the feature-space is starting to seem pretty full.

helium Sat 25 Jul 2009

Either way I hope Fan doesn't go there, we don't need things like this: http://this-statement-is-false.blogspot.com/2009/07/safe-navigaion-in-scala-take-2.html

I do little experiments like this all the time. How can I emulate a language feature from another language in the language that I currently use. More often than not the result isn't nice enough to be useable, but it's fun anyway. Sometimes I come up with something neat.

Fan isn't the best language for such fun experiments, though.

tompalmer Sat 25 Jul 2009

If you ask me, it was because of a nice syntax, and very nice & simple API's(at the time) ... I think another reason why Java is so widely used is that it's simplicity means it's easy to understand

I mostly agree with the past but not the present tense. Java is not simple these days. It's syntax was nice mostly due to familiarity. And it's APIs were about 1000% better than Win32, but some of it still took too many steps to get simple things done.

But I agree that simple is good. My opinion is that Fan has just about reached the limit of fanciness. Subtle features can be added without much cognitive load, but I personally think the syntax shouldn't go much further, if at all. And maybe jodastephen is right that we can unify some of the literal syntax a bit.

Fan isn't the best language for such fun experiments, though.

Java isn't either. And I think that's on purpose for both languages, so far as I can tell. And that is very different from Scala in that Scala has this capability (emulating language features at the API level) as a core goal. Pros and cons to it.

Login or Signup to reply.