Programming language warts: Newspeak

There’s a new language that is soon to be open sourced called Newspeak. Gilad Bracha and team are creating a new language to address what they see as the future of programming (online/offline operation, lots of service oriented design, more concurrency). They’re angling for a Smalltalk-like environment and, indeed, their current implementation is in Squeak.

Ignoring that there’s at least one other language called Newspeak, it seems like Gilad Bracha’s Newspeak is built on reasonable premises. You can read a bit about what Newspeak is like. Newspeak is definitely not done yet, but things like this give me some doubt:

note that the caret (ˆ) is used to indicate that an expression should be returned from the method, just like the return keyword in conventional languages

If I were creating a programming language, writing a sentence like that would give me pause. I would ask myself “why am I doing this differently?” If everyone in the world is using return, why choose ^? To save a few characters of typing? Really? The Newspeak document does not explain why it’s like that, it just states matter-of-factly that ^ means return.

Though they reference Self as an influence for Newspeak, they chose to go with classes rather than prototypes. That’s a good decision for adoption, because people are familiar with and like classes.

Anyhow, I think Newspeak looks interesting and it will be interesting to see how it matures. But too many arbitrary changes from “conventional” syntax are likely to hinder adoption.

6 thoughts on “Programming language warts: Newspeak”

  1. It comes from Smalltalk, which also uses ^ as return (and was traditionally rendered as an up-arrow). At least they don’t use _ for assignment 😉 (That was traditionally rendered as a left-pointing arrow)

  2. Aha! OK. For a language like Newspeak, that’s a reasonable precedent to go by, since Smalltalk is clearly an inspiration for them. It does still strike me as odd, though, that they would opt for ^ rather than return while acknowledging that return is more commonly accepted.

    Thanks for clearing that up. Smalltalk is one language that I haven’t looked too deeply at.

  3. I can imagine a short ‘^’ being better for lambdas and other short functions that benefit from concise expression.

  4. And, truth be told, that was the context in which they showed a ^. I still generally prefer things to not be too terse, because too many random characters just looks like line noise (ie is bad for readability, which is important).

    I don’t know if Newspeak also offers ‘return’ for longer functions.

  5. Hmm… in Smalltalk ^ isn’t used for lambda returns. Or… there’s no lambda, but there are blocks in Smalltalk, but a block evaluates as its last expression, and ^ does a return of the enclosing method definition.

  6. They should make it as easy and compatible as possible , something that people who studied other programming will look at it and say ” Cool , this is familiar “.

    This will make the transition for them easier because they don’t have to learn an entirely different set of syntax.

Comments are closed.