Schol-R-LEA wrote:In any case, history has proven that assuming some programmer, sane or not, would never do some particularly idiotic thing almost guarantees that one will. It usually takes nothing more than a slight error in judgment at 3AM when you have a deadline to be met at 9:30. It rarely takes even that; simple curiosity or carelessness is easily enough, especially if it seems to be working on a cursory inspection. Since this sort of thing can often escape the notice of even a detailed testing regimen, that assumption starts to look very bad indeed.
What I meant was that no sane programmer would ever write directly to an address on the stack. Anyway, if the value of a ranged integer is unexpectedly modified by an arbitrary write to some location on the stack, I guess nothing can be done to avoid having an out-of-range value, except simply not writing arbitrarily to the stack.
Passing pointers to stack variables and then using these pointers to write to that variable is quite common. Did you ever use scanf()?
But as long as you enforce type compatibility, this isn't a problem. You would have to pass an int to scanf(), then check whether the value is in the right range and then you can assign it to a u8 with restricted range.
Well, I certainly hope that you (generic you) never write to arbitrary addresses anywhere without knowing what is stored there. And if you do, I agree that you'll just get what you get without any guarantee that your type constraints are still met.
glauxosdever wrote:Since the initial question has been answered, I think I could speak a bit about the language as a whole. To start, I am going to call it G, since there is no systems programming language called like that, as far as I can tell. There are however other languages called G, but they are mostly domain specific and not well-known.
If you intend this to ever take off then please give it a name that would be easier to search for =P
Might I suggest 'Strix'? I don't think it is used for a programming language right now, though there are some things using the name (including a .NET web framework, a model of GeForce video card by Asus, and an obscure CMS project that appears to have been stillborn); and while it does carry some implications of bad omens, it is (as I understand) just the word for 'owl' in most contexts in the OP's native language, right?
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
glauxosdever wrote:Since the initial question has been answered, I think I could speak a bit about the language as a whole. To start, I am going to call it G, since there is no systems programming language called like that, as far as I can tell. There are however other languages called G, but they are mostly domain specific and not well-known.
If you intend this to ever take off then please give it a name that would be easier to search for =P
Might I suggest 'Strix'? I don't think it is used for a programming language right now, though there are some things using the name (including a .NET web framework, a model of GeForce video card by Asus, and an obscure CMS project that appears to have been stillborn); and while it does carry some implications of bad omens, it is (as I understand) just the word for 'owl' in most contexts in the OP's native language, right?
I would call the language itself "Glaux" too, but then the source file extension would be too long (i.e. ".glaux"). So I sticked (for now) with the first letter of the "Glaux". "Strix" wouldn't create a shorter extension than "Glaux" anyway.
Furthermore, "Strix" includes only a genus of owls, while "Glaux" includes all of them. So the word "Glaux" tends to be better-known.
Eh, I'd say 5 letters is OK. Actually I'd say that's the maximum reasonable for an extension (more and it'll start rivaling the filenames themselves ;P) The bigger problem is that then we wouldn't know if we're talking about your OS or the language =O) (or yourself)
...you could choose Glau I suppose. One of my fonts is called Video Glau (after a color name).
"GLADOS" is longer than "Glaux", I would rather name the language itself "Glaux" too. But I have settled with "G".
Searching for "G lang" didn't return in the first five pages anything relevant to the language being discussed here. Searching however for "G programming language" reveals my specification on the second page of Google results. Searching for "G programming language specification" shows the above specification as the first result on the first page of Google results.
Note however that I am only searching using Google in order to see how high does my site score. Normally I'm using other search engines.
From what I can see here, it seems there are multiple languages called G. Apart from the language used in LabVIEW, there is another language called G, which is used for rapid development of OpenGL applications. Since neither is well-known, I guess I could name another language "G".
From what I can see here, it seems there are multiple languages called G. Apart from the language used in LabVIEW, there is another language called G, which is used for rapid development of OpenGL applications. Since neither is well-known, I guess I could name another language "G".
I think choosing a name (and "bikeshedding" over what name to choose) is premature - there's no official spec yet and no reference implementation either, and almost everything can change between now and the time the language/compiler actually exists as a usable thing (e.g. potentially including someone like Google creating a system programming language called G and releasing it before you do).
Smarter people (Intel, Microsoft, etc) just use a mostly irrelevant codename (Longhorn, Skylake) until something is ready for release; then they decide on marketing fluff (e.g. the name the product will use) when it actually matters.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.