(Sorry if this sounds like a rant, but it's a real question and I'd appreciate real answers)
I understand that since C is so old, it might have not made sense to add it back then(MMX didn't even exist back then). But since then there was C99, and still there are no standard for SIMD variables(as far as I know).
By "SIMD variables", I m...
I am working on a new language, targeted for web development, embeding into applications, distributed applications, high-reliability software (but this is for distant future).
Also, it's target to reduce development expenses in long term - more time to write safer code and less support later. And finally, it enforces many things that re...
It seems that the C# 3.0 object initializer syntax allows one to exclude the open/close pair of parentheses in the constructor when there is a parameterless constructor existing. Example:
var x = new XTypeName { PropA = value, PropB = value };
As opposed to:
var x = new XTypeName() { PropA = value, PropB = value };
I'm curious why ...
Hi all:
i am developing a programme which is capable of recognizing several hand gestures.Now the requirement need a language using the hand gestures.So, how can i construct one ?
My current idea is using regular expression and Backus Naur Form to define the syntax,but i get stuck in the design.
PLUS :
the gestures is merely finger ...
I like reading about programming theories, so could you tell me if there is any object-oriented static typed language that allow variables to have a few types?
Example in pesudocode:
var value: BigInteger | Double | Nil
I think about way of calling methods on this object. If object value have type BigInteger | Double language could al...
I greatly enjoyed Douglas Crockford's recent lecture series, particularly the talk which covered the history of programming languages. I'd like to learn about this subject in more detail.
Consider this question language agnostic. I'm not interested in books that teach programming. I'm interested in books which discuss decisions made dur...
I frequently hear claims that Scala is much more "complex" than Java.
Can anyone therefore provide an example of Java code that can't be improved by writing it in Scala, or Scala code that can be improved by writing it in Java (but not by just rewriting within Scala)
By "improve", I mean that the code is better with regards to one (or ...
Why does this generate a compiler error:
class X { public void Add(string str) { Console.WriteLine(str); } }
static class Program
{
static void Main()
{
// error CS1922: Cannot initialize type 'X' with a collection initializer
// because it does not implement 'System.Collections.IEnumerable'
var x = new ...
A gotcha I've run into a few times in C-like languages is this:
original | included & ~excluded // BAD
Due to precedence, this parses as:
original | (included & ~excluded) // '~excluded' has no effect
Does anyone know what was behind the original design decision of three separate precedence levels for bitwise operators? More im...
The name for Lisp derives from LISt Processing. Linked lists are the major data structure of Lisp languages, and Lisp source code is itself made up of lists. As a result, Lisp programs can manipulate source code as a data structure (this is known as homoiconicity).
However, a list is by definition a sequential construct. This encourages...
In the process of developing a new language. How can be related the "high level" concepts such as "LALR parser", "abstract syntax tree", "context-free grammars", etc. with other "low level" concepts like the specific grammar rules "A -> B".
I mean as some kind of metalanguage relationship, or similar. Any ideas or suggestions to look m...
It seems to me that some languages are generally being conceived as more beautiful than others. This seems to apply to all programming paradigms. Are there any abstract/paradigm-spanning characteristics which makes programmers consider a language as beautiful?
Edit: If you think that there is no consensus then please don't hesitate to s...
Is it possible to design something like Ruby or Clojure without the significant performance loss in many situations compared with C/Java? Does hardware design play a role?
Edit: With significant I mean in an order of magnitudes, not just ten procent
Edit: I suspect that delnan is correct with me meaning dynamic languages so I changed t...
Recently there have been a couple questions regarding static type constraints and inline:
http://stackoverflow.com/questions/3754862/use-of-inline-in-f
http://stackoverflow.com/questions/3757126/how-does-f-compile-functions-that-can-take-multiple-different-parameter-types-in
Two statements in particular have struck me:
"There is no...
I know this is very abstract, however I believe it is very focused.
There are plenty of high-level languages today: C#, Java, VB, Python, etc., all created to abstract away low-level complexity and provide a more user-friendly programming experience. High-level languages can reduce, and most of the time completely remove, the necessity ...
Why does the Collections.Seq module have lots of methods that appear to be equivalent to extension methods declared in System.Linq.Enumerable? Why did the designers of F# feel the need to create a new namespace and new/different names for all of these instead of reusing what already exists in .NET?
(If they needed some extra methods, wh...
Hi!
I have often read that some programming languages are clear than others and I asked myself several times if there is an objective way to measure the clarity of a language in order to design, given an abstract syntax, a concrete syntax as clear and human friendly as possible. Perhaps exist some kind of designs patterns for that purpo...
Why do all Scala classes inherit from ScalaObject although that trait is completely empty and has no (visible?) functionality compared to AnyRef, which does define additional methods?
Won't that slow down method calls like equals() or hashCode() because it will need to take another class into consideration (which might override the meth...
I often find when debugging a program it is convenient, (although arguably bad practice) to insert a return statement inside a block of code. I might try something like this in Java ....
class Test {
public static void main(String args[]) {
System.out.println("hello world");
return;
...
I'm working on converting a mathematical formula into a program. This formula is called as optimal pricing policy for perishable products. I've seen this in an article and it is called Karush-Kuhn-Tucker condition. Somehow I lost all my maths skills and unable to understand the formula explained in that. I'm able to understand how to com...