Re: ExC: Custom programming language
Posted: Fri Feb 17, 2017 8:11 am
I suggest you to look at Rust first – I guess, it may be what you're looking for.
The Place to Start for Operating System Developers
https://f.osdev.org/
Syntactically, maybe. But java uses a JVM, possibly with AOT or JIT, and this is a compiled language.joegantic wrote:This is just Java.
I'd recommend separating "syntax" from "semantics"; and separating both from "standard library", and separating all of it from "implementation" (how any specific implementation of the compiler works internally). Semantics includes things like how each operator behaves, what the operator precedence rules are, what (and if) there's a type system and how it works and if there's any automatic type conversion, what the scope rules are, etc.Elttob wrote:Currently the reference doc is fairly empty, and I'll add more than the syntax definition over time, but it's here anyway if you want to look at it: https://docs.google.com/document/d/1o7b ... sp=sharing
I'll eventually add more of an explanation as to how to interpret the optimised notation; I initially started to write it in EBNF, but it ended up getting messy so I made optimised notation to clear it up. I'll readd the EBNF at a later date.
"Raw header file as documentation" is extremely poor documentation. Poor documentation is better than extremely poor documentation; which is why "header file with extra markup for a utility like Doxygen" exists.Solar wrote:Just for the nitpicking, there is a minority view (albeit a sizeable one) that considers the "header files" brought about by the C/C++ declaration style to be actually a benefit for various reasons, self-documentation of the API being one of them. But I won't get into a hot discussion here, just wanting to point it out.
Excluding specific situations (e.g. educational material where it can be a very good idea); the scale goes:Schol-R-LEA wrote:@Brendan: I would like to ask, in light of what you just said, what you think of Literate Programming (whether Knuth's original WEB or derivatives such as noweb and Funnelweb) and attempts at developing a 'Hyper-Literate' offshoot (I would say 'such as my own plans', but those plans are as good as written on the wind for all the progress I have made on them).
When I was looking into language/tool design I decided to build unit testing into the language/tools and support "multi-user IDE" (for peer programming and other reasons). However I've never actually done test driven development or peer programming.Schol-R-LEA wrote:On a related note, what do you think of such usually-honored-in-the-breach Agile principles as Test-Driven Development, Cross-Reviewing (I don't recall the more common name for it offhand), and Continuous Integration?
I think people that dream up these "one size fits all silver bullet" approaches to project management are the modern equivalent of snake oil salesmen. When their methodologies meet the real world they don't work, and the victims start chopping and changing in an attempt to make it into something vaguely practical for their unique combination of project, team members and customer/s.Schol-R-LEA wrote:More to the point, why do you think these ideas have generally been ignored or discarded by even their advocates? I have my own thoughts on that, of course, but I am wondering what you think about it.
Yeah, it's a bit crazy lol. Though it should be just about as hard as rolling my own compiler for an existing language now that I've finished the language specification (except maybe the lack of resources online) and, if I program the compiler well enough, and extensively test lots of corner cases, it should be easier to detect errors. I've already got a testing system planned out:zaval wrote:Personally I am sure C doesn't need a replacement. Especially for the OS development. But such opinions hardly are what you want to read. So I want to emphasize another thing.
You are in process of OS development. Developing yet another bicycle tool when there is already what you need is not helping when trying to do that complex thing. I mean if you create an OS, it is too much of complexity to do so using a tool which by itself needs to be developed. How about bugs in it which such a complex thing as OS wouldn't tolerate (it just won't compile, link, run with those)? How about optimisations of code generation? Your compiler will be lame with these respects (and endless others) for long time until you polish its internals. This problem establishes even with existing languages for which a developer is trying to create his/her own compiler. You are going to bring even a new language. It's just unbelievebly hard, let alone any benefits of doing so.
But anyway, good luck! everyone is free to go crazy their way.)))
Hope the compiler/linker toolchain of your new language will support PE/COFF format so that I could use it for my future OS if it turns to be a thing.