language-features

Simplest language to make an interpreter for

I want to make an interpreter of a very simple language for practice. When I say simple I don't mean easy to use, I mean simple. Brainf**k is a good example of a language I want. I already have made a brainf**k interpreter in python (which is the language I would be using to write the interpreter). I would appreciate any suggestions of s...

Catch access to undefined property in JavaScript

The Spider-Monkey JavaScript engine implements the noSuchMethod callback function for JavaScript Objects. This function is called whenever JavaScript tries to execute an undefined method of an Object. I would like to set a callback function to an Object that will be called whenever an undefined property in the Object is accessed or ass...

Is Java assert broken?

While poking around the questions, I recently discovered the assert keyword in Java. At first, I was excited. Something useful I didn't already know! A more efficient way for me to check the validity of input parameters! Yay learning! But then I took a closer look, and my enthusiasm was not so much "tempered" as "snuffed-out complet...

Sequences only programming language

I once read about a programming laguage which only first-order values were sequences. An integer value, for instance, was seen as a sequence of integers of one element. I totally forgot the name of that language, and the terms i use to search google are too generic, i can't find it. Anyone remembers it? :) ...

C# internal VS VBNET Friend

To this SO question: What is the C# equivalent of friend?, I would personally have answered "internal", just like Ja did among the answers! However, Jon Skeet says that there is no direct equivalence of VB Friend in C#. If Jon Skeet says so, I won't be the one telling otherwise! ;P I'm wondering how can the keyword internal (C#) not be ...

How can I add a second language to a windows mobile 6.5 application?

I am loading the text in my app from a resource file. What is the process for adding a new resource that contains the second language. Any one have an example? ...

Why C# doesn't implement indexed properties ?

I know, I know... Eric Lippert's answer to this kind of question is usually something like "because it wasn't worth the cost of designing, implementing, testing and documenting it". But still, I'd like a better explanation... I was reading this blog post about new C# 4 features, and in the section about COM Interop, the following part c...

Python features

Is there any article/paper on what features the Python language has to offer? Why should one go with Python instead of any other language? What are the strong and the weak points of Python? ...

What syntax sugar or language features makes a language hard/tough to parse?

I did some searching and didn't find a question that "directly" answered this question. Anyway the basic gist of this question is I am wondering what "language feature" or "syntax" that makes a language be a major pain to build a parser, syntax highlighting, etc? This might be subjective but I was thinking of like for example the diffe...

Shorthand for nested null checking C#

As far as I know there is not a significantly more elegant way to write the following.... string src; if((ParentContent!= null) &&(ParentContent.Image("thumbnail") != null) &&(ParentContent.Image("thumbnail").Property("src") != null)) src = ParentContent.Image("thumbnail").Property("src").Value Do you think there should be...

Displaying Hebrew text in a console

How to add a new font to the console (win7), and where can I find the right font in hebrew? I'm already find it http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q247815, but it not helps me. thanks, Dani. ...

Are there equivalents to Ruby's method_missing in other languages?

In Ruby, objects have a handy method called method_missing which allows one to handle method calls for methods that have not even been (explicitly) defined: Invoked by Ruby when obj is sent a message it cannot handle. symbol is the symbol for the method called, and args are any arguments that were passed to it. By default, the interp...

Several C# Language Questions

1) What is int? Is it any different from the struct System.Int32? I understand that the former is a C# alias (typedef or #define equivalant) for the CLR type System.Int32. Is this understanding correct? 2) When we say: IComparable x = 10; Is that like saying: IComparable x = new System.Int32(); But we can't new a struct, right? o...

What are the most useful proposed features of C1X?

What are the most useful proposed features of C1X so far? And what support for them is there in current compilers? ...

Help me validate these points regarding Ruby

Hi, I have started learning Ruby for the past 2,3 weeks and I have come up with some findings on the language. Can someone please validate these points. Implemented in many other high level languages such as C, Java, .Net etc., Is slow for the obvious reason that it cannot beat any of the already known high level languages. Should nev...

Is there anything like Enumerable.Range(x,y) in Java?

Hello there. Is there something like C#/.NET's IEnumerable<int> range = Enumerable.Range(0, 100); //.NET in Java? ...

Samples of Scala and Java code where Scala code looks simpler/has fewer lines?

I need some code samples (and I also really curious about them) of Scala and Java code which show that Scala code is more simple and concise then code written in Java (of course both samples should solve the same problem). If there is only Scala sample with comment like "this is abstract factory in Scala, in Java it will look much more ...

Why are Nested Comments forbidden?

Why are nested comments forbidden in C++, Java inspite of the fact that nested comments are useful, neat, and elegant and can be used to comment out statements that have comments? ...

Best/Worst feature(s) in Visual Studio 2010

What is the Best/Worst features of Visual Studio 2010 you like/dislike most, comparing to VS 2008? ...

How much of the "Objective-C" I'm learning is universal Objective-C, and not Apple's frameworks?

This question is related to one of my others about C: What can you do in C without “std” includes? Are they part of “C,” or just libraries? I've become curious lately as to what is really contained the the core Objective-C language, and what parts of the Objective-C I've done for iPhone/OS X development is specific to Apple platforms. ...