tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Speed of development of a compiler.


From: Basile Starynkevitch
Subject: Re: [Tinycc-devel] Speed of development of a compiler.
Date: Wed, 25 Nov 2015 07:51:33 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.3.0

On 11/24/2015 09:13 PM, AlexandreFressange wrote:


Now, I am about to finish my OS that will not be open source (no need, not a 
community project), I was working on some performance optimizations for memory 
management. I have been coding for 15 years now, but my initial formation is 
unrelated with CS. This OS is for very specific purposes that are currently 
being developed for a startup (I won't say much more right now, right here, but 
will happily do in a few time). The language resembles python but is even 
simpler (but has pointers; we always need them :) ),



This is problematic, and you are making a confusion. You are thinking that since the syntax is similar to Python, your language is Python-like.

But what matters in a programming language is not its syntax, but its semantics. For example, Javascript & Scheme have somehow similar semantics (with of course very significant and profound differences) but very different syntax.

So, if you don't know it, learn a bit of Scheme (using the SICP book I mentioned) then read Queinnec's book (Lisp in Small Pieces) which explains various way of coding Lisp interpreters and compilers.

Notice that Scheme specifications (e.g. R5RS, R6RS) have formalized most of the semantics, and that is extremely useful. Explaining what operators like call/cc do without formal semantics is error-prone. https://en.wikipedia.org/wiki/Call-with-current-continuation

A language with explicit pointers cannot resembles python, since adding explicit pointers changes the semantics profoundly.


So you should write a web page describing your language in details (giving the syntax, and explaining, at least in English, the semantics) to get more help.

Wikipedia (and the Web) have useful pages about semantics, operational semantics, denotational semantics, etc.

If you think in C (which is a language with a rather simple syntax but a difficult semantics, and whose undefined behaviors are painful), look at least inside X.Leroy's papers about CompCert and also inside Frama-C (http://frama-c.com) and its ACSL annotation language.

The notion of undefined behavior in C is tricky (and it is semantical). Read http://blog.regehr.org/archives/213 & http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html


Trust me, semantics matters more than syntax. If you can afford it, have a extremely simple syntax: the Lisp s-expressions could be inspirational.

And please, write and publish some web page somewhere about your language. Take a few days to write that (some EBNF syntax, several examples, many English paragraphs to explain informally some of the semantics). It probably might start as an ill-defined specification (in English) and we'll be able to discuss more precisely.

You'll go nowhere if you don't explain your thing.

Read many papers from the PLDI conferences. http://www.sigplan.org/Conferences/PLDI/

Regards.

PS. It looks like your emails are incorrectly encoded in KOI-8. I have to correct the encoding in every of my answers. Please change your MUA encoding to UTF8

--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***




reply via email to

[Prev in Thread] Current Thread [Next in Thread]