language-design
Does any programming language support defining constraints on primitive data types?
Last night I was thining that programming languages can have a feature in which we should be able to constraints the values assigned to primitive data types.[详细]
2023-03-14 13:27 分类:问答Why does Ruby's 'gets' includes the closing newline?
I never need the ending newline I get from gets. Half of the time I forget to chomp it开发者_运维知识库 and it is a pain in the....[详细]
2023-03-14 07:56 分类:问答Is there a language which allows manipulation of primitives?
In most cases, languages will not allow manipulations of references to primitives. Eg.: var a = 0; var b = a; // value is copied[详细]
2023-03-13 17:06 分类:问答Generating LLVM code for 'lambda', 'define'
So I now have a fairly complete LISP (scheme) interpreter written in haskell.Just for fun I want to try to have it compile down to LLVM.Most of the code generation seems pretty straight forward, but I[详细]
2023-03-13 16:51 分类:问答Where to start if I want to understand how compilers and programming languages are made [duplicate]
This question already has answers here:开发者_开发问答 Closed 11 years ago. Possible Duplicate: Learning to write a compiler[详细]
2023-03-13 01:02 分类:问答Would "dereferencing" a foreign key in SQL theoretically work?
Suppose we have 2 tables, a and b: CREATE TABLE a (id_a INT NOT NULL PRIMARY KEY, id_b INT NOT NULL) INDEX fk_id_b (id_b ASC),[详细]
2023-03-13 00:53 分类:问答Why does scala.Serializable not specify any methods?
Because the Java language required all interface开发者_运维技巧 members to be public and the original designers didn\'t want to force the \"methods\" of java.io.Serializable to be public, this was not[详细]
2023-03-12 20:19 分类:问答Why does PHP's call_user_func() function not support passing by reference?
Why don\'t the function handling functions like call_user_func() support passing parameters by reference?[详细]
2023-03-10 16:45 分类:问答Why can't I use an array index on the return value of a function? [closed]
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari[详细]
2023-03-09 21:03 分类:问答Closures in Scala vs Closures in Java
Some time ago Oracle decided that adding Closures to Java 8 would be an good idea. I wonder how design problems are solved there in comparison to Scala, which had closures since day one.[详细]
2023-03-09 01:07 分类:问答