User loginNavigation |
archivesunchecked exceptions are like runtime type checking?I've been having a running discussion with a coworker of mine. He's a big fan of Ruby, while I find its runtime type checking worrisome. His recent response to my concerns about runtime type checking is that in the Java arena people are pushing using unchecked (runtime) exceptions, and that unchecked exceptions are just as unsafe as runtime type checking. In a way I can see his argument, because in Ruby if you misspell a method name it will throw a method not found error, so you could look at Ruby's runtime type checking as simply a source of unchecked exceptions. But I have this sense that it's not quite that simple and can't put my finger on why. Lua error in Iseries (AS400)Hello all ! I will try this way with a error on a Iseries (AS/400) Is this an error in LUA or ...? ¬string "Lua ML (1):line 83:/aXes/de/lua/sidebar.html"|:4: unexpected Hope you give me an answer ! Lars Multi-Stage LanguagesFrom the Meta O'Caml tutorial.
Ignoring O'Caml for now, I have tried with the design of several languages to syntactically distinguish between multiple stages (like C++ does with its template system and macro system), and now I have been asking myself the fundamental question: is that really a good idea? If a language is pure (or at least side-effects are contained within some construct like monads) can the compiler not simply choose to apply as many stages as desired, using only partial evaluation? The reason I ask the question is that if I do something like create a subset of the language with a different notation, it just obfuscates things. It seems it would be much easier to provide metaprogramming primitives, and let the compiler's partial evaluation phase try to work out what it can, and do the rest at run-time. This may even solve some thorny type-system problems. So to sum up: my hypothesis is that I should let people write code, as if types are a first class citizen. The partial-evaluation phase will pre-execute what it can. Any non-resolved type expressions will be evaluated at run-time. Any thoughts on the subject would be welcome. |
Browse archivesActive forum topics |
Recent comments
35 weeks 6 days ago
35 weeks 6 days ago
35 weeks 6 days ago
1 year 5 weeks ago
1 year 10 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 14 weeks ago
1 year 19 weeks ago
1 year 19 weeks ago