BTW a dynamically typed language with exhaustive static analysis is a statically typechecked language.
> what was Therac written in? It is used by Roblox game developers to write game code, as well as by Roblox engineers to implement large parts of the user-facing application code as well as portions of the editor (Roblox Studio) as plugins. What was in contest, however, was the relative safeties of statically typed vs dynamically typed. What sort of evidence are you looking for? There are other attempts to add static typing to Lua (e.g. Luajit is awesome too, but if you are looking for tighter debugger integration in MSVC then look at HavokVM - which is lua vm - you can mix native/lua callstack and it works just fine.
Typed Lua says it only works with Lua >= 5.2.
> Also, projects written in statically typed languages are easier to read and navigate for humans.
> I'm also familiar with some fun disasters using software by Ada. I confess to being somewhat in love with lisp at the moment. What would be the use cases for this? I don't really accept that types are needed for safety in my games, or any application I've used Lua (okay, almost exclusively games). Did you read all of the tools in the "mixed languages" section?
E.g. All we have to do then is pattern match on the expression: Voilà, you get backward-compatible syntax with a context-sensitive keyword. Does `a + b` mean we're adding two numbers? No standards committee required!
While it appears that we could do the same thing, such as applying heuristics during parsing or type checking, we actually can’t. Share on. I dislike deeply nested, indentation cramped and tangential threads, so sometimes if I dont have anything that important to say I inline it. Dynamic languages are good, I can't imagine doing the sort of exploratory/prototyping stuff I've done in them with typical statically typed languages. We have millions of lines of Lua code already written and we are committed to ensuring that they continue to work forever. The sandboxing is described here.
Sadly, in moving to "newer" statically typed languages, you through out many of the tools that currently exist in the older languages. The main advantage is that anything that you can turn into a a type error will be reported at compilation time, much earlier in the development cycle. At the same time, I try to type my systems as well as I can.
I don't care if they are dynamic tests, statically typed assertions, statically analyzed assertions on a dynamically typed codebase, whatever. I'm optimistic enough to think that static typing is actually a good thing.
It doesn't take a lot of googling to find that Nasa used to use a Symbolics Lisp machine in their work. Also, projects written in statically typed languages are easier to read and navigate for humans and it's also easier to write static analysis tools for them. More so when everyone has left the building. (You cannot send several manned missions to the moon just to test) I am not aware of runtime typed systems that afford such proofs before running it and if some do, it is a statically proven system to begin with.
So, part of my point is I haven't ever "heard" what language those systems are written in, period. Consider, x-ray machines far predate what we realize as programmable computers. Or build your large systems as compositions of smaller systems.
Typed Lua but these efforts are mostly about adding static type checks in the language while leaving the VM unmodified. The notion that large systems are no more complex than small systems if you simply make the large system out of small systems is not supported by anything I can find. Testing proves that it passes only those specific test cases and only if the programmer tested it at all.
In many cases, the mistakes were made completely outside the realm of the program. How is having information written down instead of having to constantly remember and/or deduce it an impediment to reading?
I think that the biggest thing missing from Typescript is contract checking. About the dynamic vs Static typing debate, I think it progresses firmly along Upton Sinclair'ish lines, "It is difficult to get a man to understand something, when his salary depends upon his not understanding it! Its still very experimental though and I don't think its ready for general use yet. They are more thoroughly documented and explained than anything under other software I have ever seen. Maybe if Rails was a Lua framework we would be wondering why Ruby never made it big. This is the repository of tl, the compiler for Teal, a typed dialect of Lua.. Introduction. Having finally added "-march=native" to my flags for a build of software, I'm literally amazed at how well optimized a compile can be versus just using "-O3". I've written a few library type declarations, but used many more from others. This literally adds nothing to the debate. Therefore, they can both afford to spend some cycles trying to attempt to disambiguate this expression down to one of the two options.
I feel like a broken record this past week. You are dodging the (silly) question sir :) I said thats the only thing you know. In such cases I would rather have the error surfaced in an environment where I can control the consequences, meaning early, and as exhaustively as possible. To make it easier to write correct code, Luau comes with a set of analysis tools that can surface common mistakes.
My tone has been terrible in some of these messages. This may be a consequence of language restrictions or just typical (and understandable) programmer laziness ("good enough!")
This is not just a matter of safety but also helps in terms of refactoring and testing. Hopefully those can be fixed.
BTW the very first line says the fault had nothing to do with Ada. Me: "Not enough information to make a valid answer.". For the most part, you can.
My experience is that DefinitelyTyped definitions are actually not very accurate in practice. This is still not the fault of Ada, but it was the exact reasoning you are using to say I should prefer the statically typed solution over another, if that is all I know. Revisit my points about runtime errors on a flight controller.
You asked for quantitative evidence, but the problem is that you have already made up your mind (perhaps only subconciously) and you will find a way to lookaway from the evidence or logic (which you term just an appeal). And indeed, there are plenty of projects out there doing this, that it can't really be said Lua doesn't have traction; it just doesn't attract as much hype.
Ironically, you have better arguments against knowing specifics of the system -- that is, at the individual function level -- than you do the high level picture. Research into the speed of development and the ability to accommodate major changes in requirements and functionality would be useful as well. They still aren't statically typed. BTW Typical x-ray machines do not have the power to kill you in a single exposure, radiotherapy units absolutely can, example Therac. So with these factors in mind, the requirements are clear. How is having information written down instead of having to constantly remember and/or deduce it an impediment to reading? Apologies for that, as well. Note though it does lack some syntactical sugar, and arguments not passed are silently 'nil', so it is not strictly superior.
Your example has no bearing in clearing that question. Some people get annoyed by the notion that you can enlist the compiler (using succinct syntax) to write and validate tests that they ought to be writing.
:).
That is just a Bayesian prior, there are exceptions of course. Additionally, Luau is currently only runnable from the context of the Roblox engine, which exposes a large API surface documented on Roblox developer portal. Because of these risks involved such systems are sensibly not implemented in dynamically typed/checked languages. We chose these syntaxes because they are already immediately familiar to the majority of programmers, and are in fact industry standard.
Runtime error while spaceshuttle descends backs to earth, no thank you, on a fly-by-wire unit, when the pilot is breaking out of a loop, again no thank you.
Another unfortunate detail in Lua’s grammar prevents us from adding type arguments to function calls without introducing another ambiguity: This ambiguity only occurs in the context of an expression list. What I have not seen, is evidence that any of your claims are true. But you can't have all of these ways at the same time. I know LUA_TLIGHTUSERDATA and LUA_TUSERDATA could finnally represented as userdata, but what about LUA_TNONE? Whatever it was, it was something that did not prove that such races cannot happen, in other words it was open to runtime error, which is exactly what we want to eliminate as far as possible. Regardless, I'm familiar with Ada. The problem is that the Lua 5.1 parser is tightly coupled with bytecode generation, and that’s insufficient for our needs. It was an example.
LuaJIT runs a language that is somewhere between Lua 5.1 and Lua 5.2, so it's not clear whether it will work with Typed Lua. Of course, it might be more work to make it type check, since you have to get it right. A well-thought-out language demands its designers to take the long view. Similarly, it doesn't know that one is an error right away, the actual error may start here, but only appear in some function that's a child/parent/cousin in the call tree, obfuscating the cause and creating a great deal of work for the developer and tester. Because, honestly, right off I don't know. Remind me, what's the typing discipline of the languages supported by Coverity? Luau limits the set of standard libraries exposed to the users and implements extra sandboxing features to be able to run unprivileged code (written by our game developers) side by side with privileged code (written by us).
In Lua's case, the only thing I can think of it missing is native floating-point support, and that's really it. No.
Authors:
Typed Lua: An Optional Type System for Lua. Luau currently does not implement Just-In-Time compilation, but its interpreter is often competitive with LuaJIT interpreter on a wide set of benchmarks.
Do you trust it more than a competing one that was implemented in machine language?" And this is not just for "correctness". I even agree with the premise that "in the absence of other evidence*, I would have more faith in a statically typed solution than otherwise. (Which, I find ironic, since they are supposed to be about verification.). Kudos! You may want to take a look at openresty [1] moonscript [2], Lapis [3] and Kepler [4] . Also, don't forget that gradual typing solutions such as Typed Lua are all about letting you program dynamically if you want.
To make all of that possible, we had to rewrite most of our stack from scratch.
Whereas if it were on a single line, it is a syntax error at the as token in JavaScript, but a valid type assertion expression in TypeScript. (Simply put, if someone makes a mistake in transcribing it or "cleaning" it up, it will not be caught by a type checker. To answer this, we started the initiative to rebuild our Lua stack named “Luau” (pronounced /lu-wow/), with the goal of encompassing the features programmers expect a modern language to offer – which includes a type checker, a new linter framework, and a faster interpreter, just to name a few.