the blog
Back to -Blog

The Sapphire Programming Language - Latest News

Refining The Grammar
by Huw Collingbourne
Monday 15 September 2008.

We now have a full tree grammar for Sapphire (created using ANTLR 3.1) and we are embarking on a period of testing and documenting.

For the benefit of anyone who hasn’t been following the development of Sapphire, let me summarise this quickly. Sapphire is the name of a new programming language being developed by SapphireSteel Software to be implemented on Microsoft’s DLR (Dynamic Language Runtime) for .NET. It will be a highly encapsulated OOP language with an accessible syntax similar - though not identical - to that of Ruby. Its principal design goals are: simplicity, efficiency and reliability. It is not a version or a ‘fork’ of Ruby. It is a totally new language designed from the ground up. SapphireSteel Software shall, of course, continue to support Ruby as well as Sapphire.

Anyway, now that we have the grammar, let me explain what the testing and documenting phase involves. What we plan to do is to go through every tiny bit of the language defined by our grammar (for example, variable declarations, lambda functions, accessor methods and so on) and write small sample programs illustrating that specific language element. In other words, we’ll turn the formal language definition into real bits of Sapphire code. We then have to check that these bits of code are, in fact, allowed by our grammar. In order to do that we will feed them into the ANTLR grammar parser and, all being well, this will generate a structure in which each token - all the identifiers and punctuation - is shown on its own branch of a grammar tree. If ANTLR fails to parse the example code, this either means that the code is wrong or that our grammar is wrong.

This long, nit-picking testing phase serves three purposes:

  1. It checks that our grammar is correct.
  2. It lets us verify that the syntax of Sapphire is ‘nice’: clear, succinct, unambiguous and elegant.
  3. It ensures that we end up with a definitive language specification and a user guide.

At each step of the testing, I will be adding to and revising the ‘human readable’ language definition document and also writing chapters in a step-by-step ‘manual’ to ensure that people will be able to learn to use Sapphire easily. As readers of this blog will know, we place a great deal of importance on good documentation and it is our intention to release the Sapphire specification and user guide at the same time as the release of our implementation of the Sapphire language itself.

As always, we’ll keep you informed of the ongoing development of Sapphire here on the blog.

Bookmark and Share   Keywords:  Sapphire
  • The Sapphire Programming Language - Latest News
    13 June 2009

    what is happening to the sapphire programming language ? is it dead ?

    • The Sapphire Programming Language - Latest News
      14 June 2009, by Huw Collingbourne

      As we’ve said before, the further development of Sapphire depends on two things - 1) the completion of Amethyst (our IDE for the Flash Platform) and 2) the completion of the DLR from Microsoft. Once both those goals are met we will have more to say on Sapphire.

      best wishes

      Huw

  • The Sapphire Programming Language - Latest News
    3 June 2009, by girl wit many question(",?

    i am a student..my teacher ask me to find two latest programming languages..And i found this Sapphire Programming Languages..But,my problem is this article not tell me about the translator used for this programming languages...Can someone tell me what is the translator used for this programming language???I really need to know about that because i want to send my assignment next week..please...please..

  • The Sapphire Programming Language - Latest News
    17 September 2008

    Hello!

    All bits of info about your new DLR language souds very interesting. Can you elaborate more about purpose of Saphire language? It wuld be a general purpose programming language, or kind of DSL language for specific purpose?

    thanks, Slavo.

    • The Sapphire Programming Language - Latest News
      17 September 2008, by Huw Collingbourne

      Thanks for your interest. Sapphire will be a general purpose programming language. Its main features will be its rigorous OOP with highly modular encapsulation and its a simple, unambiguous syntax. We plan to explain specific features in the course of its development here on the blog. We have already, for example, discussed our approach to inheritance/inclusion and you will find discussions of other topics such as encapsulation will give you more insight into some of the specific areas in which we are particularly interested.

      There is more to Sapphire, however, than we have yet talked about. As for its IDE, it probably won’t be any surprise to know that we are already planning a visual design environment with a full suite of development tools. There are also one or two special aims of the language which we’ll have more to say about as we progress towards achieving them. Suffice to say that our obsession with simplicity, lack of ambiguity and strict encapsulation is more than just a whim. These features are all required to ensure the absolute reliability of Sapphire which is needed to support our long-term goals for the language.

      Sorry to be vague about some areas of Sapphire. As I said, we will describe all its features in depth here on the blog - but the complete design and implementation of Sapphire are still in their early stages so an in-depth description will have to wait until we have a little more to show for our efforts. ;-)

      best wishes

      Huw

    • The Sapphire Programming Language - Latest News
      28 May 2009, by hya

      hi, i want know more informatoin about sapphiresteal programming lauguage?

      • The Sapphire Programming Language - Latest News
        29 May 2009, by Huw Collingbourne

        Any news will be posted on the blog here. Currently we are concentrating on completing our new IDE, Amethyst for Adobe Flex. We won’t have more details of Sapphire until after the launch of Amethyst.

        best wishes

        Huw

  • The Sapphire Programming Language - Latest News
    15 September 2008, by ravenex

    Hi,

    If I were to implement a production DLR language, I’d wait a little longer. Or develop the front end only, and wait for the DLR APIs to stable before implementing the back end.

    The DLR is on major refactoring, and it’s just too much effort to catch up with the changes in the API. Some of the most important APIs have changed a lot in between the betas, such as the binder protocol. The new DLR design is turning away from ActionBinder-based binding protocol, and is going with the new MetaObject binding protocol. If there’s anyone implementing a language on top of IronPython Beta 2 or 3’s DLR, they’re likely to have to do some major refactoring to accomodate this new design.

    • The Sapphire Programming Language - Latest News
      15 September 2008, by Huw Collingbourne

      You are right. We tend to work ’one step behind’ whatever the current version of the DLR is at present. This is too big a project to wait until the ’final version’ of the DLR is available, though, so we are developing and updating incrementally. Dermot has written a bit about this process here: http://www.bitwisemag.com/2/DLR-Build-Your-Own-Language-part-3.

      best wishes

      Huw

    • The Sapphire Programming Language - Latest News
      16 September 2008

      Yes - I’m well aware of this! I’ve been trying to write a simple tutorial for the DLR (see www.bitwisemag.com) and I’ve already hit this problem.

      I’ve no objection to things being changed in the DLR - but it does seem odd to me that a beta of IronPython is being implemented on what is still essentially an alpha version of the DLR.

      The good news is that Antlr 3.1 is out and is serously cool!

      Dermot

  • The Sapphire Programming Language - Latest News
    15 September 2008, by Ganesh

    I still don’t get it why one need to adopt a new language. Ruby was already there. What’s the point in making the user learn new syntax. It was better having a standard one in place.

    • The Sapphire Programming Language - Latest News
      15 September 2008, by Huw Collingbourne

      Sapphire is quite unlike Ruby. I really can’t stress that enough. We have adopted a Ruby-like syntax because we like succinctness and human-readability and we feel that this provides an easy way in to programmers from other languages. There the similarity ends. Sapphire is a fast .NET language with very strict encapsulation (this last features is fundamental to the design of Sapphire). I would guess it is likely to be of more interest to .NET programmers or VB and Delphi programmers than to Ruby programmers. It will also have some special goals which we haven’t talked about yet but will explain as we come closer to a release version of Sapphire. Suffice to say, that it does not ’compete’ with Ruby at all. It is compiled, not interpreted, it runs on the DLR, not cross-platform. It is absolutely not a ’type’ or a variant of Ruby.

      best wishes

      Huw

© SapphireSteel Software 2014