overview of DLR?
I'm looking for a high level overview of how one goes from an AST to working code via the DLR, does anyone have (a link for) something like that? ...
I'm looking for a high level overview of how one goes from an AST to working code via the DLR, does anyone have (a link for) something like that? ...
This may look like the recent question that asked why Perl doesn't allow one-liners to be "unblocked," but I found the answers to that question unsatisfactory because they either referred to the syntax documentation that says that braces are required, which I think is just begging the question, or ignored the question and simply gave bra...
Is there a particular reason when C / C++ were created that #elif was chosen over #elsif? if ( ) { } else if ( ) { } else { } Fixed syntax ...
Hi, Today I purchased C# 3.0 Pocket Reference (O'Reilly Publishers). In that book in the first para of the first page it is given that "The C# language is platform neutral, but it was written to work well with Microsoft .Net platform" If I am not wrong, Platform Neutral mean that the softwares made from that language should run in...
My questions are more of historical nature than practical: Who invented it? Which language used it first (and to what extent)? What was the original idea, the underlying concept (which actual problems had to be solved these days, papers welcome) ? Is LISPs condition system the ancestor of current exception handling? ...
As a follow-up to my state machines as a C++-like language extension question, I'd like some more help. My compiler has been extended to parse my state machine extensions and now I'm beginning semantic analysis and code generation. There is a description on this page. Can anyone point me to good references on state machine optimization...
Why does C# prefer stack to store value types ? What is the primary reason behind this design ? Won't stack R/W operations would be processing-savy ? or may be you can justify why not others ? ...
In object-oriented programming, it's sometimes nice to be able to modify the behavior of an already-created object. Of course this can be done with relatively verbose techniques such as the strategy pattern. However, sometimes it would be nice to just completely change the type of the object by changing the vtable pointer after instant...
I am trying to design the package and module system for a programming language (Heron) which can be both compiled and interpreted, and from what I have seen I really like the Python approach. Python has a rich choice of modules, which seems to contribute largely to its success. What I don`t know is what happens in Python if a module is ...
Hi, I want to translate my web page to 7 different languages and I'm curious about what is the best way to handle this? I know this subject opened multiple times but I didn't get a reasonable answer. Actually, all the topics are about php and gettext but I use classic asp (vbscript). The method I'm using now is that; I have en.asp an...
In python 2.x, super accepts the following cases class super(object) | super(type) -> unbound super object | super(type, obj) -> bound super object; requires isinstance(obj, type) | super(type, type2) -> bound super object; requires issubclass(type2, type) | Typical use to call a cooperative superclass method: as far as I see,...
The more I delve into javascript, the more I think about the consequences of certain design decisions and encouraged practices. In this case, I am observing anonymous functions, a feature which is not only JavaScript-provided, but I see strongly used. I think we can all agree on the following facts: the human mind does not deal with m...
I'm adding coroutine support to an interpreter I'm writing and I'd like to do something like the following: typedef enum { bar_stuff, bar_other } Bar; typedef enum { foo_error=-1, foo_none=0, foo_again } Foo_state; Foo_state do_foo(Bar bar,Foo_state foo) { switch(foo) { case foo_none...
I can't understand why python has not a sign() function. It has an abs() builtin (which I consider sign()'s sister), but no sign. In python 2.6 there is even a copysign() function (in math), but no sign. Why bother to write a copysign(x,y) when you could just write a sign() and then get the copysign() directly from abs(x) * sign(y)? The...
I have heard the term "universal type" thrown around in the context of programming language type systems, does anybody know what this means? Is is something to do with objects like a String where two instances of "foo" are identical even though ("foo"=="foo") may be false? ...
Closures are an incredibly useful language feature. They let us do clever things that would otherwise take a lot of code, and often enable us to write code that is more elegant and more clear. In Python, closures are read-only affairs; that is, a function defined inside another lexical scope cannot change variables outside of its local...
If I design a new language with type inference, no explicit types and no class inheritance support and then want to add inheritance, what are the minimum extra hints to the compiler needed to resolve type ambiguity when adding the feature? Are class names needed? EDIT The type-tainting is traced through assignments throughout the prog...
I wasn't aware of this, but apparently the and and or keywords aren't operators. They don't appear in the list of python operators. Just out of sheer curiosity, why is this? And if they aren't operators, what exactly are they? ...
Why does C# require operator overloads to be static methods rather than member functions (like C++)? (Perhaps more specifically: what was the design motivation for this decision?) ...
Hi, I have a base class with an attribute and I want to hide it in a derived class. Is there any way to do this other than using reflection? [Authorize(Roles = "User,Admin,Customs")] public abstract class ApplicationController : Controller { } // hide the Authorize attribute public class ErrorController : ApplicationController { } ...